[Lazarus] I desperately need some ideas of reducing edit, compile, debug cycle

Sven Barth pascaldragon at googlemail.com
Sat Nov 27 11:52:08 CET 2010


On 27.11.2010 11:01, Michael Van Canneyt wrote:
>
>
> On Sat, 27 Nov 2010, Max Vlasov wrote:
>
>>
>>
>> On Sat, Nov 27, 2010 at 1:48 AM, Michael Van Canneyt
>> <michael at freepascal.org> wrote:
>> What you may want to do is try and avoid windows when working with
>> Lazarus. Lazarus/FPC still works
>> significantly faster on Linux.
>>
>>
>> Michael, is it known why it's still so? I mean, apart from os-specific
>> bindings, general i386 code should compile
>> identically (loops, searches and so on). Also linker for Windows is
>> rewritten some time ago as long as I remember to be
>> fast enough.
>
> I have no idea; I work almost exclusively with Linux for Lazarus/FPC. On
> the rare cases I compile something for windows, I notice that the same
> project still compiles less fast.
> The IDE itself is a good testcase there :-)

At least the startup time on Windows is much slower as on Linux, because 
on Windows (at least on NT) you have multiple API layers while on Linux 
there's mostly only the C library and with Free Pascal not even that.

On Windows you have the Win32 API libraries that either can do stuff 
themselves (good), call functions from ntdll to do the job (a bit less 
good) or even call the Win32 subsystem server (IPC!) which is - compared 
to the other two - a very slow process.

These IPC calls also happen on application startup, because the kernel 
is informing the Win32 subsystem that there is a new process (and a new 
thread - the main thread) in the system that it has to take care of. 
Also the API that is provided by the Win32 subsystem carries around much 
overhead out of compatibility reasons which slows down at least process 
startup (initialization of TLS, console information (if any), thread 
information, window information) as well.

That's why the introduction of the internal linker reduced compile time 
on Windows that much: one less process to execute :D

Regards,
Sven




More information about the Lazarus mailing list