<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Does the smart linker strip out LCL components that are not used,
or must everything that's registered in a package or unit be
included? Granted, since forms are being read from a resource
file, I doubt it can really be tied into the compiler that
closely.</p>
<p>Gareth aka. Kit<br>
</p>
<div class="moz-cite-prefix">On 09/11/2019 15:50, Sven Barth via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB_DMPdHveNYdPKX8wsE8K4L94dYxG5+bvSo_e+EAVfuAQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">J. Gareth Moreton <<a
href="mailto:gareth@moreton-family.com"
moz-do-not-send="true">gareth@moreton-family.com</a>>
schrieb am Sa., 9. Nov. 2019, 16:20:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 09/11/2019 15:14, Michael Van Canneyt wrote:<br>
><br>
><br>
> On Sat, 9 Nov 2019, J. Gareth Moreton wrote:<br>
><br>
>> Competitions aside, there are times where space
is a premium, whether <br>
>> it be from distributing an application on a DVD,
bandwidth or data <br>
>> limits (even some first world countries are still
on dial-up in <br>
>> places, or are otherwise monopolised by a single,
bad-quality <br>
>> provider), the smaller capacity of solid-state
hard drives <br>
>> (especially on some laptops) and can otherwise be
a money saver <br>
>> sometimes.<br>
><br>
> I tend to think more size gains can be obtained from
more aggressive <br>
> smartlinking.<br>
> The smartlinking is sometimes disabled by the way
code is written.<br>
><br>
> To give an example, pas2js has a switch to convert
published to public <br>
> sections. As a result, the published sections are
suddenly reduced to <br>
> what is actually used in code. This produces
significant size gains.<br>
><br>
> Michael.<br>
> _______________________________________________<br>
> fpc-devel maillist - <a
href="mailto:fpc-devel@lists.freepascal.org"
target="_blank" rel="noreferrer" moz-do-not-send="true">fpc-devel@lists.freepascal.org</a><br>
> <a
href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a><br>
><br>
That's true. That's mentioned in the "size matters"
article. I didn't <br>
know about 'published' until then. Presumably, if that
switch doesn't <br>
exist (like with most of the LCL), I gather the only way
to strip out <br>
those unused published sections is some very intelligent
whole-program <br>
optimisation, and even then it may not work if a string
(to access a <br>
property name) is not deterministic.<br>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">For the LCL it's simply not possible, because it
relies heavily on the RTTI. And in the future that will only
increase with extended RTTI. </div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards, </div>
<div dir="auto">Sven </div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
</body>
</html>