|
|
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » How BLITZ works?
How BLITZ works? [message #684] |
Wed, 25 January 2006 14:20 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
I see that the Blitz (compiltation speedup system) creates composite source files where several cpp files are included. Are there anything else that the Blitz does? Do you have some approximate numbers for how much is the compilation speed improvement? Would it be possible to use Blitz as a separate application to speed up the compilation of a 1000-file project, which is not developped in the TheIde?
|
|
|
Re: How BLITZ works? [message #689 is a reply to message #684] |
Wed, 25 January 2006 18:30 |
|
mirek
Messages: 14105 Registered: November 2005
|
Ultimate Member |
|
|
Well, average .cpp file has say 500 lines, but includes 100000 lines of headers. That is why combining C++ files into single "blitz" file is such a good idea. However, interesting part of blitz is that it has to detect which files to combine and when... (it checks them for #ifdef include guards and also excludes files changed withing one hour ago - those files are likely to be worked on).
As for speed improvements, I think you can count on 4x speedup when using gcc/linux. Actually, compilation itself is even faster, but the linker spoils it (And Tom is still reluctant about implementing uld on linux In any case, it is not hard to measure speedup for yourself - just switch BLITZ off in output mode dialog.
Problem with BLITZ used outside TheIDE is that this system expects to compile C++ and extesively uses information from packages and .cpp files. It is e.g. impossible to use similar technique with traditional makefiles. In other words, in order to have BLITZ, you need the similar project organization like the one used in TheIDE.
|
|
|
|
|
|
|
Re: How BLITZ works? [message #696 is a reply to message #695] |
Wed, 25 January 2006 21:35 |
|
mirek
Messages: 14105 Registered: November 2005
|
Ultimate Member |
|
|
Yes, that is correct. Nothing is perfect... (Just a note, you cannot use two classes with identic names - possible name clash when linking, as methods are always defined as non-static globals).
It is up to you to decide whether 4x times speedup is worth the trouble. And you can always switch BLITZ off, either using #pragma or in Output mode dialog (even on per-package basis).
From my perspective, U++ development in Linux would be nearly impossible without BLITZ... (there is a huge difference between 40 minutes or 10 minutes to compile TheIDE). And while it can affect your code in ways you mention, usually worst thing to happen is compile time error. In reality, most of C++ code works with BLITZ just fine out of box and rest can be fixed in minutes.
BTW, one thing I forgot to mention: You can, with some effort, resolve the issues with static variables in specific cases (U++ needs that to implement stuff linke INIT_BLOCK in Core/Defs.h):
BLITZ_INDEX__
is defined with specific number for each file included in BLITZ group. Somewhat ugly, but working...
|
|
|
|
|
Re: How BLITZ works? [message #792 is a reply to message #787] |
Thu, 02 February 2006 21:59 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
I didn't know about the one-hour rule. That could be the reason why the file was originally excluded from blitz, so the blitz-set did not changed when I modified the file.
|
|
|
Goto Forum:
Current Time: Fri Nov 01 00:54:50 CET 2024
Total time taken to generate the page: 0.02795 seconds
|
|
|