Open Bug 848097 Opened 11 years ago Updated 2 years ago

Notify users when building on a slow machine

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: gps, Unassigned)

References

Details

People always complain "my build is too slow." I think it would be rad if we could proactively inform people when their machine is slow so they stop blaming just the build system. (I concede the build system is worthy of much blame though.)

In bug 847073 we landed some stats gathering to moz.build loading and backend writing. We know these operations should only take a few seconds (<5 typically) on modern hardware. However, I've observed machines taking significantly longer (>10s) if I/O is slow (magnetic HD and unpopulated page cache) or if the CPU is really slow. Just look at the differences between logs on OS X and Windows builders! (Note that the CPU time on Windows is actually reporting wall time b/c we are using time.clock, so ignore the efficiency percentage.)

I propose we use the moz.build stats as a proxy for machine performance and notify the user if their machine is performing slower than expected.

For a first go, I think we can make this pretty simple. If the wall time for a RecursiveMakeBackend generation is more than X seconds, we display a message about possible performance issues due to slow hardware. Hopefully said message translates into more people buying new hardware so they don't waste so much time waiting for builds to finish.

What do people think?
We could also link to pages like:
https://developer.mozilla.org/en-US/docs/Developer_Guide/Mozilla_build_FAQ#Making_builds_faster

(After bringing them up to date in the moz.build world of course)
The main issue is in defining what the value of X should be.  I wonder how bad it would be to report build stats from mach...
I've always had a goal of mach collecting CPU, memory, and I/O performance counters during builds. I have some half-baked patches to do this (this is how I produced graphs for my build system preso). Once that was in place, I was planning to engage Privacy, etc on having these submitted for central analysis. Automatic would be preferable. But I'd settle for opt-in. Some data is better than no data :)
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.