My last post mentioned that causes our build system to do many extra calls to stat(). I’ve done some instrumentation and come up with the following numbers (Linux, Firefox trunk):

Calls to

mddepend calls to stat()

New objdir



Nothing-changed rebuild



When building from scratch, there isn’t any need to call all the invocations and stat()s performed are unnecessary overhead. When doing a rebuild, some portion of the stats performed are necessary/expected, but nowhere near as many as are actually performed. I expect a full two-thirds of the calls to are unnecesary, and probably 90% of the calls to stat(). The 224k stats in the depend build checked 16599 unique files, which means that a good stat cache reduces the size of the problem significantly.

Atom Feed for Comments 2 Responses to “ stats”

  1. darin Says:

    Are the redundant stats actually expensive? Won’t they just hit the disk buffers?

  2. Shawn Wilsher Says:

    So, is there a bug filed on this? I’d like to cc myself on it to track progress.

    How much do you think this might speed up the build process?

Leave a Reply