[Pas2js] Executable Size Discussion Nr 2837202 ;)

Michael Van Canneyt michael at freepascal.org
Fri Nov 16 11:13:21 CET 2018



On Fri, 16 Nov 2018, Mattias Gaertner via Pas2js wrote:

> On Fri, 16 Nov 2018 09:31:00 +0000
> "Ulrich, Christian" <christian.ulrich at tcsag.de> wrote:
>
>> >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.
>
> He meant published properties.
> Changing them to public will not only omit generating RTTI for them,
> but also allow the optimizer to remove unneeded ones.

Correct. That is what I meant.

Published properties, and their getter/setter/field may not be
removed, even if the optimizer detects they are not used in code.

But if they are public, then the optimizer will remove unused ones, thus
reducing the size considerably.

Michael.


More information about the Pas2js mailing list