On 2015/02/03 15:24, Mike Hommey wrote:
> On Tue, Feb 03, 2015 at 02:27:52PM +0900, ISHIKAWA,chiaki wrote:
>> I did a non-unified build and saw the expected failure.
>> This is a summary of what I saw.
>>
>> Background:
>>
>> I may need to modify and debug basic I/O routines on local PC, and so
>> want to avoid unnecessary compilation. I use ccache locally to make
>> sure I can avoid re-compilation of touched but not modified C++ source
>> files (files get touched and remain unmodified when I execute
>> "hg qpop" and "hg qpush" in successions to work on different patches.
>> Without ccache, I have to compile many files. ccache helps a lot.)
>>
>> There is a different perspective on unified compilation.
>>
>> Compiler farm users:
>>     One time fast compilation is very important.
>>     So unified compilation is a win.
>>     (I suspect precompiled headers, -pch, would be a good win, too.)
>>
>> Developers who repeats "edit a small set of files, compile and link"
>> many times on local PC:
>>
>>     He/she may modify only a few files and want quick
>>     turn around of the compile of a few files and link time.
>>
>>     Unified compilation actually compiles more lines than he/she wants
>>     (because of the extra source lines included in unified source files
>>     in which his/her modified files are also included.
>>     (Correct? Am I missing something here?)
>>     So he/she may not like unified compilation in such scenario.
> 
> Here's my take on this: yes, we should optimize for build times when
> code is modified.
> 
> But here's the thing: in most directories, unified compilation shouldn't
> be making a huge difference. That is, compiling one unified source vs.
> compiling one source shouldn't make a big difference. If it does (and it
> does in some directories like js/src), then the number of unified
> sources in the directory where it's a problem should be adjusted.
> 
> Mike

Mike, thank you for the comment.
I suspect this is indeed the case in many directories.
(I mean unless a change of a single file caused 20 or 30 files to be
included into a unified source, then it is an overhead certainly. But so
far, the upper-bound of single change of a file is less than a couple of
minutes including the link with -gsplit-dwarf.)

I will report if I find a file, when touched, causes  an extraordinarily
long compilation time (by including many of the source files during
unified compilation).

By the way, I saw Unified_binding_*.cpp files during compilation, and I
suspect they are different types of unified compilation since this
"unified_binding" compilation seems to occur no matter what the setting
of FILES_PER_UNIFIED_FILE.

TIA

CI


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to