This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Optimize handling of source files in gprbuild


This need for optimization showed up in callgrind profiles on a
scenario where gprbuild is run on an up-to-date project with
thousands of source files. When processing 4200 files, for
instance, memcpy would be called more than 4 millions times
in process_sources_in_multi_language_mode

With this improvement and similar changes in gprbuild's code,
processing an up-to-date project with 15000 files (half Ada,
half C) went down from around 1:29min down to 28s on my machine

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-04-08  Emmanuel Briot  <briot@adacore.com>

	* prj-nmsc.adb (Check_File, Process_Sources_In_Multi_Language_Mode):
	avoid copies of Source_Data variables when possible, since these
	involve calls to memcpy() which are done too many times.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]