mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Coffler <Jeff.Coff...@microsoft.com.INVALID>
Subject Proposal: Precompiled headers for Windows use in cmake
Date Mon, 27 Mar 2017 20:03:16 GMT
I had previously send an E-Mail to the Mesos DEV list on Tue 2/14/2017 11:29 AM. I've attached
that message here for reference (hopefully the attachment will make it across).

Work has proceeded, and I'm working out some commits to apply to the changes for Windows (cmake
only).

While I was asked to work out timing for Linux platforms, I was unable to do so as the Linux
code doesn't currently build with precompiled headers due to overloading of the std namespace
(Set/set, as I recall). We could hack sources to build with precompiled headers, but this
would be throw-away work and thus doesn't seem all that useful an engineering expenditure.
But without the permanent changes needed there to avoid namespace pollution, or hack/throw
away changes, it's not possible to get timing tests for PCH use on Linux at this time.

For Windows, here are the results of timing tests that I've done:

Build times on Windows (no PCH):
  1. Full build time (everything including 3rd party products): 24:49.47 (1489.47s total)
  2. Time to rebuild all of Mesos itself: 21:8.63 (1268.63s total)
  3. Time for a build with no changes: 0:30.47 (30.47s total)
  4. Modified file 3rdparty/stout/include/stout/os/os.hpp (added a comment)
  5. Time for an incremental build: 36:55.55 (2215.55s total)
     (Very odd that an incremental takes longer than a full build!)
  6. Time for an incremental build (just mesos-agent): 0:14:24.73 (864.73s total)
  7. Time for an incremental build, mesos-agent only: 0:16:42.57 (1002.57s total)
     (Includes speedup to linker flags)


Build times on Windows (with PCH):
  1. Full build time (everything including 3rd party products): 19:54.49 (1194.49s total)
  2. Time to rebuild all of Mesos itself: 0:15:49.58 (949.58s total)
  3. Time for a build with no changes: 0:0:21.72 (21.72s total)
  4. Modified file 3rdparty/stout/include/stout/os/os.hpp (added a comment)
  5. Time for an incremental build: 0:34:40.64 (2080.64s total)
  6. Time for an incremental build (just mesos-agent): 0:11:53.57 (713.57s total)
  7. Time for an incremental build, mesos-agent only: 0:10:43.10 (643.10s total)
     (Includes speedup to linker flags)

To be clear here, more work can be done. We pretty much just optimized building mesos-agent.
There are other targets that would benefit from PCH as well. However, unless/until we start
doing major portions of work in those areas, it may not make sense. (For example, we're unlikely
to do major pieces of redesign to most of our 3rd party components, nor do we have the ability
to change those build processes anyway.)

The above timing tests include the time to actually build the PCH. In the full build case,
the reduction is close to 25%. In the incremental build case (#7), the reduction is closer
to 33%. In both cases, we believe that this change is worthwhile.

Any questions/concerns? If not, I'll work on finalizing the commits and getting them tested
in the next few days.

/Jeff

Mime
View raw message