Shorter build times

Krzysztof Lichota krzysiek at lichota.net
Wed Mar 28 09:49:25 BST 2007


Peter Kümmel napisał(a):
> Hi,
> 
> here an idea to speed up compilation
> by factor 3 to 4.
> 
> When working on KDE one does not work
> on all projects and files at the same time,
> which means, most files will not be touched,
> and they could be build with the
> KDE4_ENABLE_FINAL flag.
> 
> The problem using KDE4_ENABLE_FINAL is that
> the projects with the touched files have to
> rebuild completely on each change.
> (With KDE4_ENABLE_FINAL a file is generated
> which includes all cpp files.)
> 
> The idea of attached patch is to manually
> exclude some files from the generated
> all-in-one file.
> When a developer don't wanna compile the
> complete project after changing a file
> he edits the generated include-all
> file in his local build tree.

I think most of developers do not have time to manually change such
files. How about excluding from this all-in-one file automatically all
source files which were modified <1 days ago?

Which reminds me of another trick I used at work when building large
projects. By default build system compiles files in order specified in
Makefile/other control file. If I was working on one header and one
source file and there were other files dependent on this header, build
system rebuilt them in this static order until it got to source file
corresponding to header file, while often if there was an error, I would
change header again and go through rebuilding all these files again. So
I changed list of compiled files to be autogenerated in order of
modification time, so that file I am working on is compiled first. This
saved me a lot of time :)

Disclaimer: I do not know details of KDE build system, so if it is
already done, ignore these remarks :)

	Krzysztof Lichota



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070328/66fe5009/attachment.sig>


More information about the kde-core-devel mailing list