[Pas2js] Executable Size Discussion Nr 2837202 ;)

Ulrich, Christian christian.ulrich at tcsag.de
Fri Nov 16 10:31:00 CET 2018


>The biggest gain is expected to be achieved by removing unnecessary RTTI.
>The RTTI is not needed when you build forms dynamically.

I have removed the RTTI Stuff from my rtl.js and it makes ~2kb of 34kb (maybe I have overseen stuff)
Also compressing and stripping the rtl.js with my complete application makes 20kb of 34kb so I decided for me to not investigate much in those direction.

>ExtJS and many other widgetsets arrive at the same size.

Yes I use DHTMLX for GUI at time and its 1,2mb. I think without emulating stauff we never need on the web it could be ~50kb 
At time my Webapps are with DHTMLX and css and stuff ~3,4mb that makes Loading times of 15secs on mobile Networks. 
Without controls and skins and stuff I  can have the same Application in ~500kb and 2,5 secs loading time.
And in Germany we have no networks when you are outside of towns ;)

>This is wrong thinking. Please have a look at the ExtJS data store. It's size and functionality is similar to (if not much bigger than) TDataset.

Maybe thats the case becouse so many  Webapps uses vue, angular and react and so few ExtJS :).

>If you want to offer the same functionality with other mechanisms, you will quickly end up using frameworks (_underscore, backbone and the like) that have a similar footprint when you add them together.

That's not true, the TDataSet/TDatasource/Controls Stuff is introduced to bind DataSets to Datacontrols. Vue does the same with 58kb Footprint and is able to bind the Data to any Element  and not only on Datacontrols.

>But I am open to restructure TDataset so the optimizer (and the optimizer really does a lot of work) can do an even better job.

I like the idea that you answered later in this mail, to have different librarys to do the job. TDataSet could be an nice point for the Delphi users who just want to port there Apps to the Web without much change. 
For an big Userbase and an nice modern reactive Webapp, we should go away from the Delphi 7 Stuff and use modern technologies.

>As you know, TMS web core is built on pas2js. If anything, the feedback from end users is that we need MORE delphi compatible libraries. 
>People want to be able to drop a TMySQLDataset on their webform, and all should be automagically transferred to/from some database backend running on whatever server, which takes care of REST and whatnot.
>These people are really not interested in the size of their webpage JS.

Yeah I think you get a lot of reactions from TMS Webcore and old Delphi developers at time. Surely they can have absolutely new opportunities with pas2js.  And anyone whoms Apps are not used frequently is not interested in the size of its webpage js. But we live in times where Google measures the reaction times of Webapplications and score that in the search engine result sores... 
Use Google Lighthouse for an Webapp with ExtJS ot pas2js TDataSet and you get horrible scores...

>This is not to say that we should not care, far from it. 
>I'm just giving a small exerpt from the feedback we get till now.

I think we both can understand the point of each other, I also not want to tell that we should have no "Web LCL" but maybe its also good to have an modern Framework at the other side.

>I think that we need a 2-way approach.
>- Provide libraries that make the development experience as close to Delphi/Lazarus RAD as possible.
>- Provide a set of libraries that are doing more what Angular,React,Vue are doing. (possibly using wrappers around these libraries)

100% agree.

Christian.


More information about the Pas2js mailing list