[x264-devel] [PATCH] build: Generate dependency information as a side-effect of compilation

Diego Biurrun diego at biurrun.de
Tue May 6 14:21:30 CEST 2014


On Sat, May 03, 2014 at 12:20:18PM -0400, Steven Walters wrote:
> On Sat, May 3, 2014 at 10:30 AM, Diego Biurrun <diego at biurrun.de> wrote:
> > This allows updating dependency information each time a file is changed,
> > instead of creating dependency information once at the first build. In the
> > latter case, dependency information is not updated each time a file is
> > changed so that it can get out of date quickly.
> > ---
> 
> The frequency into which files include more additional headers
> (dependencies expand), where this is actually beneficial is not that
> prevalent on the project.
> Also, this noticeably degrades the performance of building with ICL
> (and similarly MSVS) where dependency generation is considerably
> slower than gcc.
> 
> As such, I'm not sure as to the worth of this.

You value speed over correctness?  Seriously? :)

How much of a performance hit are we talking about anyway?  And does
anybody care?  x264 takes two minutes to build on my notebook from
the days of yore, 15 seconds on my multicore build host.

Do you care about building in 16 seconds and are willing to tolerate
occasional incorrect builds in exchange?  In my experience build systems
with incorrect dependency generation lead to people building from scratch
all the time instead of trusting the correctness of rebuilds.  This of
course takes much, much longer than the extra cycles spent on dependency
generation.

Most importantly, dependencies are already getting generated right now.
So currently everybody is paying the cost of dependency generation every
time x264 gets built.  And lo and behold, generating dependencies as a
side-effect of compilation is quicker.  On my slow notebook build times
decrease from 1m15s to 1.13s with --disable-asm --disable-opencl (used
in order to mask out time spent assembling and running Perl scripts).

I tested with gcc 4.8 and I remain sceptical that build times actually
increase with ICL.  In the current system ICL also has to generate deps
in the beginning.  You claim that processing files two times is faster.
Benchmarks or it does not exist ;-p

Anyway, I'll update this patch again.  Generating dependencies for .asm
files is probably overkill and does slow down the build slightly since
it's done separately and not as a side-effect of assembling.

Diego


More information about the x264-devel mailing list