On Fri, Apr 10, 2009 at 02:22:06PM +0400, dmitry boyarintsev wrote:
Can compiler detect, if initialized procedure variable is not used and
smartlink it off?
In the following example:
there's a global procedure variable. it's initialized by unit2, that
is used by program.
but even if it's
Florian Klaempfl пишет:
This could be simply the influence of a different memory layout of the exe.
It seams that I was wrong. So. Lets do next small test.
The main program is:
program small_test;
{$mode objfpc}{$H+}
uses
Unit1;
begin
Print_Hello_Word;
end.
Uni1.pas is:
Unit unit1;
Alexey S. Smirnov schreef:
Florian Klaempfl пишет:
This could be simply the influence of a different memory layout of the exe.
It seams that I was wrong. So. Lets do next small test.
The main program is:
|program small_test;
{$mode objfpc}{$H+}
uses
Unit1;
begin
Print_Hello_Word;
Vincent Snijders пишет:
No, the initialization section of the graphics unit and its dependencies
is used. The lesson is: you cannot smart link away initialization (and
finalization) sections of a unit.
Vincent
But result is very understandable - if we have some unused units (with
Alexey S. Smirnov wrote:
So. Ones more - to reduce Lazarus-aware projects code size we shall
first check and cleanup Uses sections to remove unused units, and next
- test Initialization and Finalization sections. Do we really need them?
For the Dephi times I remember that those sections
Marco van de Voort wrote:
If Lazarus as the most major user starts avoid these problems instead of
reporting them, that is worrying. Paul more or less proves the point with 2
bugs in a version cycle of which one is inlining related.
Another known and workarounded in lazarus problem:
On Wed, Apr 8, 2009 at 18:36, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
In order to break the circles, you must first find them. Move all uses
to the interface section and FPC will find them for you.
As I already written some time ago, the solution is to introduce a hint/warning
for
Zitat von Alexander Klenin kle...@gmail.com:
On Wed, Apr 8, 2009 at 18:36, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
In order to break the circles, you must first find them. Move all uses
to the interface section and FPC will find them for you.
As I already written some time ago,
On Tue, Apr 7, 2009 at 5:13 PM, Marc Weustink m...@dommelstein.net wrote:
No, but the problem is caused by the way fpc stores info in the .ppu
Somehow it is possible that the checksum of the interface part stored in
the .ppu is affected by the implementation section.
Since I started using
Sergei Gorelkin wrote:
Mattias Gaertner wrote:
Btw a little different question : what is needed to allow lineinfo
reading stack trace from external file (in case of exception) for
example of the name corresponding to exe name but with different
extension. FPC can now dump debug info into
Graeme Geldenhuys schrieb:
I thought this was known:
http://wiki.lazarus.freepascal.org/DesignGuidelines
This is the first I here of this.
Me 2.
I have used FPC since 2.0.2 under Linux and Windows and haven't had
any issues. I limit the usage of interface uses clause as much as
Marco van de Voort wrote:
How recently was this all validated to still be a problem? I know FPC didn't
performed the (apparantly long due) unit system rewrite yet, but not that
much problems in that realm are reported in mantis anymore, even for the
current implementation.
And this one:
Paul Ishenin wrote:
Bogusław Brandys wrote:
That's great! Maybe it could be changed so if debug info filename is not
found in debug section of executable then it tries to open a separate
debug file generated by fpc (which can be of the same name as executable
but different extension)
What
2009/4/8 Alexey S. Smirnov betates...@rambler.ru:
The Smart Link process should check what variables/functions/definitions are
used in your project to cut off unused code. It is really simple to do so,
if some units are listed in Implementation section - linker will only add
unit functions
Alexey S. Smirnov schrieb:
Martin Friebe пишет:
Is this documented somewhere? I can't follow the logic anyway, the scope
how much my code uses of another unit can not be predicted, simply by
where I include the other code?
Actually, I do believe I have seen examples where code form units
Florian Klaempfl пишет:
Alexey S. Smirnov schrieb:
This could be simply the influence of a different memory layout of the exe.
Yes, potentially...
But, please - explain - why compiler can simply detect and remove
unused Unit from Implementation section and NEWER do that for
On Wed, Apr 08, 2009 at 03:55:54PM +0200, Marc Weustink wrote:
How recently was this all validated to still be a problem? I know FPC didn't
performed the (apparantly long due) unit system rewrite yet, but not that
much problems in that realm are reported in mantis anymore, even for the
Marco van de Voort wrote:
If Lazarus as the most major user starts avoid these problems instead of
reporting them, that is worrying. Paul more or less proves the point with 2
bugs in a version cycle of which one is inlining related.
For me, when developing it is the difference between a make
Reenen Laurie schrieb:
Just a note: some people think that units can be compiled in one pass -
this is not true. The compiler must stop on every Uses clause, and
So .exe's should be (much) smaller if your uses units are put mostly
in implementation
No, that's not related at all.
If we
Zitat von Alexander Klenin kle...@gmail.com:
On 2009-04-03, Marc Weustink marc.weust...@cuperus.nl wrote:
Alexey S. Smirnov wrote:
SmartLink problem is quite simple. It seems that all units, mentioned in
Interface-Uses section will be fully linked. Only units mentioned in
2009/4/7 Graeme Geldenhuys graemeg.li...@gmail.com:
I believed that is why the smartlinking works so well with
fpGUI - I can create a GUI application that is only 340KB in size.
Can somebody explain to me why smartlinking works better when a unit
is in the implementation section than when it is
Zitat von Alexander Klenin kle...@gmail.com:
On 2009-04-07, Mattias Gärtner nc-gaert...@netcologne.de wrote:
I strongly agree with Alexey here. The bug in FPC should be fixed and
Lazarus source updated to remove unnecessary units from 'uses'
clauses.
Not so much for executable size,
On Tue, 07 Apr 2009 17:32:58 +0200
Bogusław Brandys bran...@o2.pl wrote:
Marc Weustink wrote:
Graeme Geldenhuys wrote:
2009/4/7 Mattias Gärtner nc-gaert...@netcologne.de:
Uses sections in implementation sections are buggy as long as I
know fpc. The problems are known but apparently too
This isn't such a big deal because hello world applications are
useless, in real world applications you will need to use multiple
components, have graphics support, use xml, etc, and those are already
there, so your EXE size won't grow when you need them.
I had many times the need to make a
Graeme Geldenhuys :
On Fri, Apr 3, 2009 at 3:02 AM, Paul Ishenin i...@kmiac.ru wrote:
Felipe Monteiro de Carvalho wrote:
And this has been debated 1 million times before, please search in the
mailling list archives.
This also means that problem of
Hello Felipe,
Yes, I know that size isn't a big deal in a real world, but this is
correct just for some kind of GUI applications. From version to version
LCL application executables grows in size. What size of empty
applications will produce Lazarus in 2 years? 5 MBs or 10 MBs? :) If LCL
On Fri, Apr 3, 2009 at 2:18 PM, Paul Ishenin webpi...@mail.ru wrote:
I think it will not grow to more than 2MB even after 2 years. Moreover I
suspect size can go down when we start using native resources.
Well Paul, it is already way above 2MB! Using Lazarus (trunk) r19175.
LCL-fpGUI =
Hello everyone!
As stated in this article http://wiki.freepascal.org/Size_Matters Lazarus
apps on Windows are about 500k, but quickly grow to 1.5 MB however I cannot
made Lazarus to build empty application less than 1.8 MB. I've enabled
option Link Smart at Linking tab of compiler options as well
Igor Tkachenko schreef:
Does this mean that 1.8 MB is the size of empty Lazarus application now?
Yes. For an application that includes the LCL.
Or I do something wrong?
No.
I think the size of 500 kB was too high from the beginning, I never saw
it smaller than 1 or 1.2 MB, but the size has
The application is not empty. If you check the symbols inside the
application you will see that almost all LCL components are added, and
PNG support, XML library, etc, etc, etc, even if not used. The
smartlinking is simply not yet good enought to remove those parts.
This isn't such a big deal
Felipe Monteiro de Carvalho wrote:
And this has been debated 1 million times before, please search in the
mailling list archives.
This also means that problem of big executable size worries developers.
Maybe we need to research more how to make our executables smaller.
Best regards,
Paul
Igor Tkachenko wrote:
Hello everyone!
As stated in this article http://wiki.freepascal.org/Size_Matters
Lazarus apps on Windows are about 500k, but quickly grow to 1.5 MB
however I cannot made Lazarus to build empty application less than 1.8
MB. I've enabled option Link Smart at Linking
32 matches
Mail list logo