Sign in Join
Wiki copytemporary

File size and smartlinking: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-This article is a work in progress about executable size and smartlinking on Lazarus. Feel free to contribute.
1+This article is a work in progress about executable size and smartlinking on Lazarus. Feel free to contribute.
22
3+## Contents
4+
5+ * 1 Introduction
6+ * 2 Case study 1 in Windows
7+ * 3 Remove unused functions in a class
8+ * 4 Bytes Used
9+ * 4.1 by Lib
10+ * 5 See Also
11+
312## Introduction
413
5-In Free Pascal, "smartlinking" is removing unused code and variables from the final executable. This is done during the linking stage, when the executable is written using the object files created by the compiler earlier.
14+In Free Pascal, "smartlinking" is removing unused code and variables from the final executable. This is done during the linking stage, when the executable is written using the object files created by the compiler earlier.
615
716## Case study 1 in Windows
817
9-This study was conducted on the 8th of February 2006 because a Lazarus fully compiled with Smartlinking was Released (version 0.9.12). It intends to establish the relationship between the varying results below with different Lazarus and Free Pascal versions as well as with Smartlinking and without.
10-
11-The Variables being studied are:
18+This study was conducted on the 8th of February 2006 because a Lazarus fully compiled with Smartlinking was Released (version 0.9.12). It intends to establish the relationship between the varying results below with different Lazarus and Free Pascal versions as well as with Smartlinking and without.
1219
13-- Executable size after strip
14-- Executable size after strip and UPX
15-- Linking time
20+
21+The Variables being studied are:
1622
17-Compile time isn´t considered here because it´s too similar on all configurations and much less significant than the link time.
23+ * Executable size after strip
24+ * Executable size after strip and UPX
25+ * Linking time
1826
19-Executable size without strip isn´t included. Notice that strip was used always from command line with the command:
27+
28+Compile time isn´t considered here because it´s too similar on all configurations and much less significant than the link time.
2029
21- strip --strip-all magnifier.exe
30+
31+Executable size without strip isn´t included. Notice that strip was used always from command line with the command:
32+```
33+strip --strip-all magnifier.exe
34+```
2235
36+
2337The program being compiled is the Virtual Magnifying Glass. The source and binaries for this program are freely available for download on: <http://magnifier.sourceforge.net>
2438
25-About the linking time please note that the utilized computer is 3.2GHz Pentium 4 with Intel motherboard and dual core processor and 512MB of RAM.
39+
40+About the linking time please note that the utilized computer is 3.2GHz Pentium 4 with Intel motherboard and dual core processor and 512MB of RAM.
2641
42+
2743**Results**
2844
29-The utilized OS is Windows XP and the 0.9.13 versions are from the same date when 0.9.12 was release. The comparison took place using the following software configurations:
30-
31-- Lazarus 0.9.12 available [here](http://sourceforge.net/project/showfiles.php?group_id=89339). Free Pascal 2.0.2 that comes with the installer. LCL and RTL are smartlinked. Refered from now on as simply 0.9.12.
45+
46+The utilized OS is Windows XP and the 0.9.13 versions are from the same date when 0.9.12 was release. The comparison took place using the following software configurations:
3247
33-- Lazarus 0.9.13 downloaded from Subversion from the same date. Free Pascal 2.0.2 installed separately. The LCL is not smartlinked. Refered from now on as simply 0.9.13 + 2.0.2.
48+ * Lazarus 0.9.12 available [here](<http://sourceforge.net/project/showfiles.php?group_id=89339>). Free Pascal 2.0.2 that comes with the installer. LCL and RTL are smartlinked. Refered from now on as simply 0.9.12.
3449
35-- Lazarus 0.9.13 snapshot. Free Pascal 2.1 that comes with the installer. The LCL is not smartlinked. Refered from now on as simply 0.9.13 + 2.1.
50+ * Lazarus 0.9.13 downloaded from Subversion from the same date. Free Pascal 2.0.2 installed separately. The LCL is not smartlinked. Refered from now on as simply 0.9.13 + 2.0.2.
3651
37-- Lazarus 0.9.13 snapshot. Free Pascal 2.1 that comes with the installer. The LCL is smartlinked. Refered from now on as simply 0.9.13 + 2.1 + SL.
52+ * Lazarus 0.9.13 snapshot. Free Pascal 2.1 that comes with the installer. The LCL is not smartlinked. Refered from now on as simply 0.9.13 + 2.1.
3853
39-| | 0.9.12 | 0.9.13 + 2.0.2 | 0.9.13 + 2.1 + SL | 0.9.13 + 2.1 |
40-|----|----|----|----|----|
41-| File Size after strip (in bytes) | 1,108,480 | 1,587,712 | 1,425,408 | 1,649,152 |
42-| File Size after UPX (in bytes) | 318,976 | 438,272 | 388,608 | 454,144 |
43-| Linking time | 15 seconds | 5 seconds | 45 seconds | 10 seconds |
54+ * Lazarus 0.9.13 snapshot. Free Pascal 2.1 that comes with the installer. The LCL is smartlinked. Refered from now on as simply 0.9.13 + 2.1 + SL.
4455
45-![](/wiki-images/a/a1/OuptutFileSizesComparisonChart.png)
56+| 0.9.12 | 0.9.13 + 2.0.2 | 0.9.13 + 2.1 + SL | 0.9.13 + 2.1
57+---|---|---|---|---
58+File Size after strip (in bytes) | 1,108,480 | 1,587,712 | 1,425,408 | 1,649,152
59+File Size after UPX (in bytes) | 318,976 | 438,272 | 388,608 | 454,144
60+Linking time | 15 seconds | 5 seconds | 45 seconds | 10 seconds
61+
62+[![OuptutFileSizesComparisonChart.png](/wiki-images/a/a1/OuptutFileSizesComparisonChart.png)](</File:OuptutFileSizesComparisonChart.png>)
4663
4764**Conclusion**
4865
49-The 0.9.13 snapshot from the 8th of February 2006 features a unstable compiler from the 2.1 branch, which can cause the bigger executables and slower linking time as compared to the other versions.
66+
67+The 0.9.13 snapshot from the 8th of February 2006 features a unstable compiler from the 2.1 branch, which can cause the bigger executables and slower linking time as compared to the other versions.
5068
51-The 0.9.12 version has the best file size of all, both with UPX and without, showing that Smartlinking really can diminish the file size in Windows. This, however, does not come without a cost, and the cost is linking time, which is about 3 times higher then without smartlinking.
69+
70+The 0.9.12 version has the best file size of all, both with UPX and without, showing that Smartlinking really can diminish the file size in Windows. This, however, does not come without a cost, and the cost is linking time, which is about 3 times higher then without smartlinking.
5271
53-The 0.9.12 version already comes fully configured for Smartlinking on Windows and no extra configuration is needed. This was not the case on previous releases.
72+
73+The 0.9.12 version already comes fully configured for Smartlinking on Windows and no extra configuration is needed. This was not the case on previous releases.
5474
5575## Remove unused functions in a class
5676
57-Q: If a virtual method of a class is not used at all in the programm will the compiler remove it from the executable ?
77+Q: If a virtual method of a class is not used at all in the programm will the compiler remove it from the executable ?
5878
59-A: If you use FPC 2.3.1 with whole-program optimization and the compiler can prove that it is never callable: yes. See [[Whole Program Optimization]] for more information. In case this is in relation to the thread on the Lazarus list about the big executables: note that it has only a limited effect on Lazarus programs, because almost all linked LCL code can potentially be executed (due to the way the LCL is constructed). In fact, I think most savings there come from making a number of virtual method calls non-virtual, rather than from throwing away unreachable code.
79+A: If you use FPC 2.3.1 with whole-program optimization and the compiler can prove that it is never callable: yes. See [[Whole Program Optimization]] for more information. In case this is in relation to the thread on the Lazarus list about the big executables: note that it has only a limited effect on Lazarus programs, because almost all linked LCL code can potentially be executed (due to the way the LCL is constructed). In fact, I think most savings there come from making a number of virtual method calls non-virtual, rather than from throwing away unreachable code.
6080
61-The internal linker can also do it (only throwing away virtual method calls, not turning virtual method calls into static ones), but only on Windows platforms. It is however not currently enabled in the compiler, because the changes break the external linker. It should therefore be turned into a command line option (along with a check that produces an error if you try to link a unit compiled with the option using the external linker), but that hasn't been done yet.
81+The internal linker can also do it (only throwing away virtual method calls, not turning virtual method calls into static ones), but only on Windows platforms. It is however not currently enabled in the compiler, because the changes break the external linker. It should therefore be turned into a command line option (along with a check that produces an error if you try to link a unit compiled with the option using the external linker), but that hasn't been done yet.
6282
63-Q: How can the compiler determine that a virtual method is unused at all,
83+Q: How can the compiler determine that a virtual method is unused at all,
6484
65-A: If you have a class hierarchy TBase-\>TDerived1-\>TDerived2 with a virtual method called "vmethod", and nowhere in the program there is a call to vmethod, then it is unused. Or if it is only called using TDerived2 instances, then if the linker does not find any direct references to TDerived1.vmethod or TBase.vmethod (e.g., via "inherited" calls from TDerived2 methods), it knows that the VMT entries for "vmethod" in TDerived1 and TBase can be set to nil.
85+A: If you have a class hierarchy TBase->TDerived1->TDerived2 with a virtual method called "vmethod", and nowhere in the program there is a call to vmethod, then it is unused. Or if it is only called using TDerived2 instances, then if the linker does not find any direct references to TDerived1.vmethod or TBase.vmethod (e.g., via "inherited" calls from TDerived2 methods), it knows that the VMT entries for "vmethod" in TDerived1 and TBase can be set to nil.
6686
6787## Bytes Used
6888
69-Here's a layout by pascal units in bytes used for code. The size is based on Dwarf2 information generated. Doesn't include resources size used by a unit.
70-
71-The project is a single form application (no additional controls used). Lazarus used is a Trunk version of 23 Jan 2020.
89+Here's a layout by pascal units in bytes used for code. The size is based on Dwarf2 information generated. Doesn't include resources size used by a unit.
7290
73-No optimization was used during compilation.
91+The project is a single form application (no additional controls used). Lazarus used is a Trunk version of 23 Jan 2020.
7492
75-| Size | Lib | Package | Category | File name |
76-|--------|------|----------|----------|--------------------------------|
77-| 238704 | lcl | base | | controls.pp |
78-| 144064 | lcl | base | | graphics.pp |
79-| 111280 | lcl | ws | | win32/win32int.pp |
80-| 106880 | lcl | base | | forms.pp |
81-| 98000 | rtl | rtl | | system.pp |
82-| 94432 | lcl | base | | intfgraphics.pas |
83-| 90352 | lcl | base | | comctrls.pp |
84-| 90224 | rtl | rtl | | classes.pp |
85-| 59552 | lcl | base | | stdctrls.pp |
86-| 51888 | lcl | base | | interfacebase.pp |
87-| 50336 | rtl | rtl | | ../win/sysutils.pp |
88-| 37728 | lcl | base | | imglist.pp |
89-| 35456 | rtl | rtl | | rtl-objpas/src/inc/variants.pp |
90-| 33232 | lcl | lazutils | | lazutf8.pas |
91-| 31456 | lcl | base | | extctrls.pp |
92-| 30912 | fcl | image | | fcl-image/src/fpreadtiff.pas |
93-| 30816 | lcl | ws | | win32/win32wscomctrls.pp |
94-| 30800 | lcl | ws | | win32/win32wsmenus.pp |
95-| 28832 | lcl | base | | menus.pp |
96-| 25984 | lcl | base | | maskedit.pp |
97-| 24480 | rtl | rtl | | rtl-objpas/src/win/varutils.pp |
98-| 24048 | lcl | base | | dialogs.pp |
99-| 23632 | fcl | json | | fcl-json/src/fpjson.pp |
100-| 23456 | lcl | ws | | win32/win32wsstdctrls.pp |
101-| 23408 | lcl | base | | lclintf.pas |
102-| 18448 | lcl | base | | lresources.pp |
103-| 17904 | lcl | lazutils | | textstrings.pas |
104-| 16736 | fcl | image | | fcl-image/src/fpcanvas.pp |
105-| 16544 | lcl | lazutils | | graphtype.pp |
106-| 13408 | lcl | base | | themes.pas |
107-| 13168 | lcl | ws | | win32/win32proc.pp |
108-| 13136 | fcl | image | | fcl-image/src/pixtools.pp |
109-| 13088 | lcl | lazutils | | lazloggerbase.pas |
110-| 12368 | lcl | lazutils | | laz_avl_tree.pp |
111-| 11872 | fcl | image | | fcl-image/src/fpimage.pp |
112-| 11776 | lcl | base | | actnlist.pas |
113-| 11488 | lcl | base | | buttons.pp |
114-| 10576 | rtl | debug | | ../inc/heaptrc.pp |
115-| 10544 | lcl | ws | | win32/win32wsbuttons.pp |
116-| 10464 | rtl | rtl | | ../objpas/typinfo.pp |
117-| 9744 | fcl | image | | fcl-image/src/fpreadpng.pp |
118-| 9696 | lcl | base | | graphmath.pp |
119-| 9536 | lcl | lazutils | | lazlogger.pas |
120-| 9424 | lcl | lazutils | | lazfileutils.pas |
121-| 9296 | lcl | base | | buttonpanel.pas |
122-| 9248 | fcl | image | | fcl-image/src/fpwritetiff.pas |
123-| 8864 | lcl | base | | clipbrd.pp |
124-| 8768 | lcl | ws | | win32/win32extra.pas |
125-| 8768 | fcl | jpeg | | pasjpeg/src/jquant2.pas |
126-| 8720 | fcl | jpeg | | pasjpeg/src/jdmarker.pas |
127-| 8160 | fcl | image | | fcl-image/src/fpwritepng.pp |
128-| 8016 | fcl | image | | fcl-image/src/fpwritebmp.pp |
129-| 7792 | fcl | zlib | | paszlib/src/trees.pas |
130-| 7648 | fcl | zlib | | paszlib/src/zdeflate.pas |
131-| 7536 | fcl | image | | fcl-image/src/ellipses.pp |
132-| 7472 | lcl | ws | | win32/win32wsforms.pp |
133-| 7456 | fcl | image | | fcl-image/src/fpreadbmp.pp |
134-| 7328 | lcl | ws | | win32/win32themes.pas |
135-| 6880 | fcl | jpeg | | pasjpeg/src/jdcoefct.pas |
136-| 6864 | lcl | base | | lclproc.pas |
137-| 6624 | lcl | lazutils | | lazutf16.pas |
138-| 6400 | lcl | ws | | win32/win32wscontrols.pp |
139-| 6240 | fcl | zlib | | paszlib/src/infblock.pas |
140-| 5920 | lcl | base | | lclrescache.pas |
141-| 5792 | fcl | image | | fcl-image/src/fpreadjpeg.pas |
142-| 5728 | fcl | image | | fcl-image/src/fppixlcanv.pp |
143-| 5680 | fcl | ws | | win32/win32wsspin.pp |
144-| 5648 | lcl | lazutils | | maps.pp |
145-| 5632 | lcl | ws | | win32/win32wsimglist.pp |
146-| 5568 | fcl | jpeg | | pasjpeg/src/jchuff.pas |
147-| 5520 | fcl | jpeg | | pasjpeg/src/jmemmgr.pas |
148-| 5392 | fcl | jpeg | | pasjpeg/src/jquant1.pas |
149-| 5264 | fcl | image | | fcl-image/src/fpreadgif.pas |
150-| 5232 | fcl | jpeg | | pasjpeg/src/jdphuff.pas |
151-| 5152 | lcl | base | | imagelistcache.pas |
152-| 5104 | lcl | base | | widgetset/wsstdctrls.pp |
153-| 5008 | fcl | json | | fcl-json/src/jsonscanner.pp |
154-| 4992 | lcl | base | | widgetset/wslclclasses.pp |
155-| 4880 | fcl | jpeg | | pasjpeg/src/jcphuff.pas |
156-| 4848 | fcl | utils | | fcl-base/src/contnrs.pp |
157-| 4816 | fcl | image | | fcl-image/src/fptiffcmn.pas |
158-| 4768 | rtl | debug | | ../inc/lnfodwrf.pp |
159-| 4640 | fcl | jpeg | | pasjpeg/src/jcmaster.pas |
160-| 4592 | fcl | jpeg | | pasjpeg/src/jdhuff.pas |
161-| 4512 | fcl | jpeg | | pasjpeg/src/jcparam.pas |
162-| 4256 | fcl | jpeg | | pasjpeg/src/jcsample.pas |
163-| 4208 | lcl | base | | widgetset/wscomctrls.pp |
164-| 4160 | fcl | zlib | | paszlib/src/infcodes.pas |
165-| 3936 | fcl | zlib | | paszlib/src/inftrees.pas |
166-| 3616 | fcl | jpeg | | pasjpeg/src/jcmarker.pas |
167-| 3584 | fcl | zlib | | paszlib/src/zstream.pp |
168-| 3584 | fcl | jpeg | | pasjpeg/src/jidctint.pas |
169-| 3488 | fcl | image | | fcl-image/src/fpwritepnm.pp |
170-| 3472 | fcl | image | | fcl-image/src/fpreadpnm.pp |
171-| 3360 | fcl | jpeg | | pasjpeg/src/jdmerge.pas |
172-| 3312 | lcl | base | | icnstypes.pas |
173-| 3248 | fcl | jpeg | | pasjpeg/src/jccoefct.pas |
174-| 3216 | fcl | jpeg | | pasjpeg/src/jdsample.pas |
175-| 3168 | fcl | jpeg | | pasjpeg/src/jdmainct.pas |
176-| 3152 | lcl | base | | widgetset/wsimglist.pp |
177-| 3120 | lcl | base | | spin.pp |
178-| 3120 | fcl | jpeg | | pasjpeg/src/jdmaster.pas |
179-| 3104 | rtl | winapi | | winunits-base/src/uxtheme.pp |
180-| 2992 | lcl | base | | widgetset/wscontrols.pp |
181-| 2944 | fcl | json | | fcl-json/src/jsonparser.pp |
182-| 2896 | fcl | jpeg | | pasjpeg/src/jccolor.pas |
183-| 2848 | fcl | zlib | | paszlib/src/zinflate.pas |
184-| 2832 | fcl | jpeg | | pasjpeg/src/jdcolor.pas |
185-| 2816 | fcl | jpeg | | pasjpeg/src/jcdctmgr.pas |
186-| 2752 | lcl | lazutils | | lazmethodlist.pas |
187-| 2736 | fcl | jpeg | | pasjpeg/src/jidctred.pas |
188-| 2704 | rtl | debug | | ../inc/exeinfo.pp |
189-| 2688 | fcl | jpeg | | pasjpeg/src/jidctfst.pas |
190-| 2576 | fcl | jpeg | | pasjpeg/src/jidctflt.pas |
191-| 2496 | rtl | rtl | | ../objpas/fgl.pp |
192-| 2464 | fcl | jpeg | | pasjpeg/src/jdinput.pas |
193-| 2448 | lcl | ws | | win32/win32wsfactory.pas |
194-| 2352 | fcl | image | | fcl-image/src/fpwritejpeg.pas |
195-| 2320 | fcl | jpeg | | pasjpeg/src/jcprepct.pas |
196-| 2208 | lcl | lazutils | | lclclasses.pp |
197-| 2032 | fcl | jpeg | | pasjpeg/src/jerror.pas |
198-| 2016 | rtl | winapi | | winunits-base/src/multimon.pp |
199-| 2016 | fcl | jpeg | | pasjpeg/src/jfdctint.pas |
200-| 1952 | rtl | winapi | | windows.pp |
201-| 1888 | fcl | jpeg | | pasjpeg/src/jdapimin.pas |
202-| 1872 | fcl | image | | fcl-image/src/clipping.pp |
203-| 1824 | fcl | zlib | | paszlib/src/inffast.pas |
204-| 1808 | lcl | base | | extendedstrings.pas |
205-| 1712 | lcl | base | | customtimer.pas |
206-| 1648 | lcl | base | | helpintfs.pas |
207-| 1584 | fcl | jpeg | | pasjpeg/src/jfdctfst.pas |
208-| 1584 | fcl | jpeg | | pasjpeg/src/jfdctflt.pas |
209-| 1584 | rtl | rtl | | ../objpas/math.pp |
210-| 1472 | fcl | jpeg | | pasjpeg/src/jdpostct.pas |
211-| 1360 | fcl | jpeg | | pasjpeg/src/jdapistd.pas |
212-| 1280 | fcl | utils | | fcl-base/src/custapp.pp |
213-| 1200 | lcl | lazutils | | lazfilecache.pas |
214-| 1152 | lcl | base | | widgetset/wsmenus.pp |
215-| 1152 | lcl | lazutils | | lazclasses.pas |
216-| 1120 | fcl | jpeg | | pasjpeg/src/jddctmgr.pas |
217-| 1056 | lcl | base | | widgetset/wsforms.pp |
218-| 1040 | lcl | lazutils | | integerlist.pas |
219-| 1024 | fcl | jpeg | | pasjpeg/src/jcapimin.pas |
220-| 992 | lcl | base | | lcltype.pp |
221-| 848 | lcl | lazutils | | lazstringutils.pas |
222-| 832 | fcl | image | | fcl-image/src/fpimgcanv.pp |
223-| 768 | lcl | base | | widgetset/wsproc.pp |
224-| 688 | rtl | rtl | | ../objpas/types.pp |
225-| 672 | lcl | ws | | win32/win32wsdialogs.pp |
226-| 672 | lcl | lazutils | | lazutf8classes.pas |
227-| 656 | fcl | jpeg | | pasjpeg/src/jcmainct.pas |
228-| 656 | rtl | rtl | | ../inc/fpintres.pp |
229-| 640 | lcl | lazutils | | laztracer.pas |
230-| 624 | fcl | jpeg | | pasjpeg/src/jdatasrc.pas |
231-| 560 | fcl | image | | fcl-image/src/fpimgcmn.pp |
232-| 528 | fcl | zlib | | paszlib/src/infutil.pas |
233-| 528 | fcl | utils | | fcl-base/src/syncobjs.pp |
234-| 512 | lcl | base | | lclmessageglue.pas |
235-| 496 | fcl | jpeg | | pasjpeg/src/jutils.pas |
236-| 496 | fcl | jpeg | | pasjpeg/src/jdatadst.pas |
237-| 480 | fcl | jpeg | | pasjpeg/src/jcapistd.pas |
238-| 464 | rtl | winapi | | winunits-base/src/commctrl.pp |
239-| 432 | lcl | base | | widgetset/wsextctrls.pp |
240-| 432 | fcl | zlib | | paszlib/src/zbase.pas |
241-| 384 | fcl | jpeg | | pasjpeg/src/jmemnobs.pas |
242-| 368 | fcl | jpeg | | pasjpeg/src/jcomapi.pas |
243-| 336 | rtl | rtl | | ../objpas/objpas.pp |
244-| 288 | lcl | base | | widgetset/wsdialogs.pp |
245-| 288 | fcl | xml | | fcl-xml/src/htmldefs.pp |
246-| 256 | fcl | jpeg | | pasjpeg/src/jinclude.pas |
247-| 256 | fcl | jpeg | | pasjpeg/src/jcinit.pas |
248-| 256 | lcl | lazutils | | lcltaskdialog.pas |
249-| 256 | lcl | lazutils | | laz2_xmlread.pas |
250-| 224 | lcl | base | | widgetset/wsspin.pp |
251-| 208 | lcl | base | | widgetset/wsbuttons.pp |
252-| 208 | fcl | zlib | | paszlib/src/adler.pas |
253-| 192 | rtl | rtl | | ../objpas/unicodedata.pas |
254-| 144 | lcl | lazutils | | avglvltree.pas |
255-| 128 | lcl | base | | widgetset/wsreferences.pp |
256-| 112 | lcl | lazutils | | stringhashlist.pas |
257-| 112 | main | app | | project1.lpr |
258-| 96 | rtl | winapi | | ../win/windirs.pp |
259-| 96 | rtl | winapi | | ../win/dos.pp |
260-| 80 | lcl | base | | lclversion.pas |
261-| 80 | lcl | base | | lclplatformdef.pas |
262-| 80 | lcl | base | | forms/calcform.pas |
263-| 80 | lcl | lazutils | | fileutil.pas |
264-| 64 | lcl | ws | | win32/interfaces.pp |
265-| 64 | lcl | lazutils | | lazutilities.pas |
266-| 64 | lcl | lazutils | | laz2_dom.pas |
267-| 64 | rtl | rtl | | ../inc/strings.pp |
268-| 48 | lcl | lazutils | | lconvencoding.pas |
269-| 48 | lcl | lazutils | | lazsysutils.pas |
270-| 48 | lcl | lazutils | | laz2_xmlutils.pas |
271-| 48 | lcl | lazutils | | fpcadds.pas |
272-| 48 | fcl | utils | | fcl-base/src/rttiutils.pp |
273-| 32 | fcl | utils | | fcl-base/src/gettext.pp |
93+No optimization was used during compilation.
27494
275-- Note, that zlib is used for PNG images reading and writting
95+Size | Lib | Package | Category | File name
96+---|---|---|---|---
97+238704 | lcl | base | | controls.pp
98+144064 | lcl | base | | graphics.pp
99+111280 | lcl | ws | | win32/win32int.pp
100+106880 | lcl | base | | forms.pp
101+98000 | rtl | rtl | | system.pp
102+94432 | lcl | base | | intfgraphics.pas
103+90352 | lcl | base | | comctrls.pp
104+90224 | rtl | rtl | | classes.pp
105+59552 | lcl | base | | stdctrls.pp
106+51888 | lcl | base | | interfacebase.pp
107+50336 | rtl | rtl | | ../win/sysutils.pp
108+37728 | lcl | base | | imglist.pp
109+35456 | rtl | rtl | | rtl-objpas/src/inc/variants.pp
110+33232 | lcl | lazutils | | lazutf8.pas
111+31456 | lcl | base | | extctrls.pp
112+30912 | fcl | image | | fcl-image/src/fpreadtiff.pas
113+30816 | lcl | ws | | win32/win32wscomctrls.pp
114+30800 | lcl | ws | | win32/win32wsmenus.pp
115+28832 | lcl | base | | menus.pp
116+25984 | lcl | base | | maskedit.pp
117+24480 | rtl | rtl | | rtl-objpas/src/win/varutils.pp
118+24048 | lcl | base | | dialogs.pp
119+23632 | fcl | json | | fcl-json/src/fpjson.pp
120+23456 | lcl | ws | | win32/win32wsstdctrls.pp
121+23408 | lcl | base | | lclintf.pas
122+18448 | lcl | base | | lresources.pp
123+17904 | lcl | lazutils | | textstrings.pas
124+16736 | fcl | image | | fcl-image/src/fpcanvas.pp
125+16544 | lcl | lazutils | | graphtype.pp
126+13408 | lcl | base | | themes.pas
127+13168 | lcl | ws | | win32/win32proc.pp
128+13136 | fcl | image | | fcl-image/src/pixtools.pp
129+13088 | lcl | lazutils | | lazloggerbase.pas
130+12368 | lcl | lazutils | | laz_avl_tree.pp
131+11872 | fcl | image | | fcl-image/src/fpimage.pp
132+11776 | lcl | base | | actnlist.pas
133+11488 | lcl | base | | buttons.pp
134+10576 | rtl | debug | | ../inc/heaptrc.pp
135+10544 | lcl | ws | | win32/win32wsbuttons.pp
136+10464 | rtl | rtl | | ../objpas/typinfo.pp
137+9744 | fcl | image | | fcl-image/src/fpreadpng.pp
138+9696 | lcl | base | | graphmath.pp
139+9536 | lcl | lazutils | | lazlogger.pas
140+9424 | lcl | lazutils | | lazfileutils.pas
141+9296 | lcl | base | | buttonpanel.pas
142+9248 | fcl | image | | fcl-image/src/fpwritetiff.pas
143+8864 | lcl | base | | clipbrd.pp
144+8768 | lcl | ws | | win32/win32extra.pas
145+8768 | fcl | jpeg | | pasjpeg/src/jquant2.pas
146+8720 | fcl | jpeg | | pasjpeg/src/jdmarker.pas
147+8160 | fcl | image | | fcl-image/src/fpwritepng.pp
148+8016 | fcl | image | | fcl-image/src/fpwritebmp.pp
149+7792 | fcl | zlib | | paszlib/src/trees.pas
150+7648 | fcl | zlib | | paszlib/src/zdeflate.pas
151+7536 | fcl | image | | fcl-image/src/ellipses.pp
152+7472 | lcl | ws | | win32/win32wsforms.pp
153+7456 | fcl | image | | fcl-image/src/fpreadbmp.pp
154+7328 | lcl | ws | | win32/win32themes.pas
155+6880 | fcl | jpeg | | pasjpeg/src/jdcoefct.pas
156+6864 | lcl | base | | lclproc.pas
157+6624 | lcl | lazutils | | lazutf16.pas
158+6400 | lcl | ws | | win32/win32wscontrols.pp
159+6240 | fcl | zlib | | paszlib/src/infblock.pas
160+5920 | lcl | base | | lclrescache.pas
161+5792 | fcl | image | | fcl-image/src/fpreadjpeg.pas
162+5728 | fcl | image | | fcl-image/src/fppixlcanv.pp
163+5680 | fcl | ws | | win32/win32wsspin.pp
164+5648 | lcl | lazutils | | maps.pp
165+5632 | lcl | ws | | win32/win32wsimglist.pp
166+5568 | fcl | jpeg | | pasjpeg/src/jchuff.pas
167+5520 | fcl | jpeg | | pasjpeg/src/jmemmgr.pas
168+5392 | fcl | jpeg | | pasjpeg/src/jquant1.pas
169+5264 | fcl | image | | fcl-image/src/fpreadgif.pas
170+5232 | fcl | jpeg | | pasjpeg/src/jdphuff.pas
171+5152 | lcl | base | | imagelistcache.pas
172+5104 | lcl | base | | widgetset/wsstdctrls.pp
173+5008 | fcl | json | | fcl-json/src/jsonscanner.pp
174+4992 | lcl | base | | widgetset/wslclclasses.pp
175+4880 | fcl | jpeg | | pasjpeg/src/jcphuff.pas
176+4848 | fcl | utils | | fcl-base/src/contnrs.pp
177+4816 | fcl | image | | fcl-image/src/fptiffcmn.pas
178+4768 | rtl | debug | | ../inc/lnfodwrf.pp
179+4640 | fcl | jpeg | | pasjpeg/src/jcmaster.pas
180+4592 | fcl | jpeg | | pasjpeg/src/jdhuff.pas
181+4512 | fcl | jpeg | | pasjpeg/src/jcparam.pas
182+4256 | fcl | jpeg | | pasjpeg/src/jcsample.pas
183+4208 | lcl | base | | widgetset/wscomctrls.pp
184+4160 | fcl | zlib | | paszlib/src/infcodes.pas
185+3936 | fcl | zlib | | paszlib/src/inftrees.pas
186+3616 | fcl | jpeg | | pasjpeg/src/jcmarker.pas
187+3584 | fcl | zlib | | paszlib/src/zstream.pp
188+3584 | fcl | jpeg | | pasjpeg/src/jidctint.pas
189+3488 | fcl | image | | fcl-image/src/fpwritepnm.pp
190+3472 | fcl | image | | fcl-image/src/fpreadpnm.pp
191+3360 | fcl | jpeg | | pasjpeg/src/jdmerge.pas
192+3312 | lcl | base | | icnstypes.pas
193+3248 | fcl | jpeg | | pasjpeg/src/jccoefct.pas
194+3216 | fcl | jpeg | | pasjpeg/src/jdsample.pas
195+3168 | fcl | jpeg | | pasjpeg/src/jdmainct.pas
196+3152 | lcl | base | | widgetset/wsimglist.pp
197+3120 | lcl | base | | spin.pp
198+3120 | fcl | jpeg | | pasjpeg/src/jdmaster.pas
199+3104 | rtl | winapi | | winunits-base/src/uxtheme.pp
200+2992 | lcl | base | | widgetset/wscontrols.pp
201+2944 | fcl | json | | fcl-json/src/jsonparser.pp
202+2896 | fcl | jpeg | | pasjpeg/src/jccolor.pas
203+2848 | fcl | zlib | | paszlib/src/zinflate.pas
204+2832 | fcl | jpeg | | pasjpeg/src/jdcolor.pas
205+2816 | fcl | jpeg | | pasjpeg/src/jcdctmgr.pas
206+2752 | lcl | lazutils | | lazmethodlist.pas
207+2736 | fcl | jpeg | | pasjpeg/src/jidctred.pas
208+2704 | rtl | debug | | ../inc/exeinfo.pp
209+2688 | fcl | jpeg | | pasjpeg/src/jidctfst.pas
210+2576 | fcl | jpeg | | pasjpeg/src/jidctflt.pas
211+2496 | rtl | rtl | | ../objpas/fgl.pp
212+2464 | fcl | jpeg | | pasjpeg/src/jdinput.pas
213+2448 | lcl | ws | | win32/win32wsfactory.pas
214+2352 | fcl | image | | fcl-image/src/fpwritejpeg.pas
215+2320 | fcl | jpeg | | pasjpeg/src/jcprepct.pas
216+2208 | lcl | lazutils | | lclclasses.pp
217+2032 | fcl | jpeg | | pasjpeg/src/jerror.pas
218+2016 | rtl | winapi | | winunits-base/src/multimon.pp
219+2016 | fcl | jpeg | | pasjpeg/src/jfdctint.pas
220+1952 | rtl | winapi | | windows.pp
221+1888 | fcl | jpeg | | pasjpeg/src/jdapimin.pas
222+1872 | fcl | image | | fcl-image/src/clipping.pp
223+1824 | fcl | zlib | | paszlib/src/inffast.pas
224+1808 | lcl | base | | extendedstrings.pas
225+1712 | lcl | base | | customtimer.pas
226+1648 | lcl | base | | helpintfs.pas
227+1584 | fcl | jpeg | | pasjpeg/src/jfdctfst.pas
228+1584 | fcl | jpeg | | pasjpeg/src/jfdctflt.pas
229+1584 | rtl | rtl | | ../objpas/math.pp
230+1472 | fcl | jpeg | | pasjpeg/src/jdpostct.pas
231+1360 | fcl | jpeg | | pasjpeg/src/jdapistd.pas
232+1280 | fcl | utils | | fcl-base/src/custapp.pp
233+1200 | lcl | lazutils | | lazfilecache.pas
234+1152 | lcl | base | | widgetset/wsmenus.pp
235+1152 | lcl | lazutils | | lazclasses.pas
236+1120 | fcl | jpeg | | pasjpeg/src/jddctmgr.pas
237+1056 | lcl | base | | widgetset/wsforms.pp
238+1040 | lcl | lazutils | | integerlist.pas
239+1024 | fcl | jpeg | | pasjpeg/src/jcapimin.pas
240+992 | lcl | base | | lcltype.pp
241+848 | lcl | lazutils | | lazstringutils.pas
242+832 | fcl | image | | fcl-image/src/fpimgcanv.pp
243+768 | lcl | base | | widgetset/wsproc.pp
244+688 | rtl | rtl | | ../objpas/types.pp
245+672 | lcl | ws | | win32/win32wsdialogs.pp
246+672 | lcl | lazutils | | lazutf8classes.pas
247+656 | fcl | jpeg | | pasjpeg/src/jcmainct.pas
248+656 | rtl | rtl | | ../inc/fpintres.pp
249+640 | lcl | lazutils | | laztracer.pas
250+624 | fcl | jpeg | | pasjpeg/src/jdatasrc.pas
251+560 | fcl | image | | fcl-image/src/fpimgcmn.pp
252+528 | fcl | zlib | | paszlib/src/infutil.pas
253+528 | fcl | utils | | fcl-base/src/syncobjs.pp
254+512 | lcl | base | | lclmessageglue.pas
255+496 | fcl | jpeg | | pasjpeg/src/jutils.pas
256+496 | fcl | jpeg | | pasjpeg/src/jdatadst.pas
257+480 | fcl | jpeg | | pasjpeg/src/jcapistd.pas
258+464 | rtl | winapi | | winunits-base/src/commctrl.pp
259+432 | lcl | base | | widgetset/wsextctrls.pp
260+432 | fcl | zlib | | paszlib/src/zbase.pas
261+384 | fcl | jpeg | | pasjpeg/src/jmemnobs.pas
262+368 | fcl | jpeg | | pasjpeg/src/jcomapi.pas
263+336 | rtl | rtl | | ../objpas/objpas.pp
264+288 | lcl | base | | widgetset/wsdialogs.pp
265+288 | fcl | xml | | fcl-xml/src/htmldefs.pp
266+256 | fcl | jpeg | | pasjpeg/src/jinclude.pas
267+256 | fcl | jpeg | | pasjpeg/src/jcinit.pas
268+256 | lcl | lazutils | | lcltaskdialog.pas
269+256 | lcl | lazutils | | laz2_xmlread.pas
270+224 | lcl | base | | widgetset/wsspin.pp
271+208 | lcl | base | | widgetset/wsbuttons.pp
272+208 | fcl | zlib | | paszlib/src/adler.pas
273+192 | rtl | rtl | | ../objpas/unicodedata.pas
274+144 | lcl | lazutils | | avglvltree.pas
275+128 | lcl | base | | widgetset/wsreferences.pp
276+112 | lcl | lazutils | | stringhashlist.pas
277+112 | main | app | | project1.lpr
278+96 | rtl | winapi | | ../win/windirs.pp
279+96 | rtl | winapi | | ../win/dos.pp
280+80 | lcl | base | | lclversion.pas
281+80 | lcl | base | | lclplatformdef.pas
282+80 | lcl | base | | forms/calcform.pas
283+80 | lcl | lazutils | | fileutil.pas
284+64 | lcl | ws | | win32/interfaces.pp
285+64 | lcl | lazutils | | lazutilities.pas
286+64 | lcl | lazutils | | laz2_dom.pas
287+64 | rtl | rtl | | ../inc/strings.pp
288+48 | lcl | lazutils | | lconvencoding.pas
289+48 | lcl | lazutils | | lazsysutils.pas
290+48 | lcl | lazutils | | laz2_xmlutils.pas
291+48 | lcl | lazutils | | fpcadds.pas
292+48 | fcl | utils | | fcl-base/src/rttiutils.pp
293+32 | fcl | utils | | fcl-base/src/gettext.pp
294+
295+ * Note, that zlib is used for PNG images reading and writting
276296
277297### by Lib
278298
279-| lib | code | percentage |
280-|-------|---------|------------|
281-| rtl | 340752 | 15.46% |
282-| lcl | 1491184 | 67.75% |
283-| fcl | 372176 | 16.88% |
284-| main | 122 | 0.01% |
285-| Total | 2204234 | 100% |
286-
299+lib | code | percentage
300+---|---|---
301+rtl | 340752 | 15.46%
302+lcl | 1491184 | 67.75%
303+fcl | 372176 | 16.88%
304+main | 122 | 0.01%
305+Total | 2204234 | 100%
306+
287307## See Also
288308
289-- [[Size Matters]]
309+ * [[Size Matters]]
290310
291311---
292-*From the Free Pascal wiki, page "File size and smartlinking", as it stood on 2020-01-24 after a change by Skalogryz, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
293-Category: FPC
294-Category: Lazarus
312+*From the Free Pascal wiki, page "File size and smartlinking", as the Internet Archive kept it on 2022-09-24. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history