To unify or not to unify: A case study on unified builds (in WebKit)

Takafumi Kubota, Yusuke Suzuki, Kenji Kono

Research output: Chapter in Book/Report/Conference proceedingConference contribution

1 Citation (Scopus)

Abstract

Unified builds are a simple but effective technique to reduce the build time of large software projects. Unified builds generate large compiler tasks by bundling multiple source files into one, resulting in a significant reduction in build time through removal of redundant work incurred by shared headers. However, unified builds have a negative effect on incremental builds because each compiler task gets larger. An ad-hoc unification strategy causes an excessive slowdown in incremental builds. A rough report from WebKit says the worst slowdown is 20% (6s → 7s), but our investigation shows it is as high as 479% (19s → 110s). In this paper, we investigate the characteristics of unified builds to find a sweet spot, which generates compiler tasks that reduce the full build time without increasing the incremental build time. An in-depth analysis of WebKit reveals 1) source files with higher header similarity should be unified, 2) source files that have significant differences in compile times should not be unified, and 3) source files that are not frontend-intensive should not be unified. Our case study shows the total build time is reduced by 2.66%, and the worst slowdown falls from 479% to 129%. These findings will be of help in deriving a more intelligent strategy of unification and give a basis for discussions on future build systems, compilers, and module systems that cooperatively generate efficient compiler tasks.

Original languageEnglish
Title of host publicationCC 2019 - Proceedings of the 28th International Conference on Compiler Construction
EditorsJ. Nelson Amaral, Milind Kulkarni
PublisherAssociation for Computing Machinery
Pages42-52
Number of pages11
ISBN (Electronic)9781450362771
DOIs
Publication statusPublished - 2019 Feb 16
Event28th International Conference on Compiler Construction, CC 2019 - Washington, United States
Duration: 2019 Feb 162019 Feb 17

Publication series

NameACM International Conference Proceeding Series

Conference

Conference28th International Conference on Compiler Construction, CC 2019
Country/TerritoryUnited States
CityWashington
Period19/2/1619/2/17

Keywords

  • Build system
  • Compile time analysis
  • Incremental builds
  • Source code characterization
  • Unified builds

ASJC Scopus subject areas

  • Software
  • Human-Computer Interaction
  • Computer Vision and Pattern Recognition
  • Computer Networks and Communications

Cite this