[Development] Rules for including private headers

Thiago Macieira thiago.macieira at intel.com
Mon Feb 17 18:42:01 CET 2014


Em seg 17 fev 2014, às 12:04:10, Koehne Kai escreveu:
> I did a quick reality check on this one:
> https://codereview.qt-project.org/#change,78318 changes all _p.h includes
> to a canonical <private/xxx_p.h> format, and I couldn't measure any
> difference when compiling on windows (where filesystem accesses are
> traditionally slow), both with and without patches applied.

I'd be REALLY surprised if the impact of the extra indirection were more than 
a couple of milliseconds per file, on Windows. So if we build 2000 files, the 
total cost would be 2-4 seconds of CPU time. Remember to divide that by the 
number of parallel compilation jobs to get the wallclock time.

So, if the total cost is more than 1 second in the full build of qtbase, I'd 
be surprised.

Besides, that's what SSDs and good filesystem engines are for.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list