On Sat, Nov 27, 2010 at 1:52 PM, Sven Barth <[email protected]>wrote:
> 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 >>> <[email protected]> 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 > > Sven, it all really matters, but on modern computers with enough memory installed all these hd-related difference become irrelevant on the next usage of the same files/executables/dlls, since they all go to the system cache. Lazarus IDE starts in less than a second on my win7 notebook after the first run/exit. I did also some checking with compiling. Inside the Lazrus and if I did the same from command-line with ppc386, the compile time for lazarus.lpi is 5.4 seconds if a did not any single change and a little more ( 5.7 ms) (the numbers from ppc386). If I did a change to one of the pascal files. gdb start is about 3 seconds, but I just checked, this is because of the anti-virus was probably investigating the new running exe file (if I switch AV off, the program appears almost instantly). Michael mentioned "a couple of seconds at most" and he is known to be working on IDE :), so if on his linux machine ide compiles/links in less than two seconds, then it really can be a noticeable difference for a comparatively big project (although we can not comparing without comparing hardware configurations) Max
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
