Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium build optimizations #49797

Merged
merged 5 commits into from
Mar 7, 2019
Merged

Conversation

avnik
Copy link
Contributor

@avnik avnik commented Nov 5, 2018

Motivation for this change

Drop dependency on gtk2 (chromium itself now require gtk3 for theming)
Use SOURCE_DATE_EPOCH to build timestamp generation (I believe it more stable, than built-in magic based on LASTCOMMIT file and rounded to 5:00 of first monday on month).
Sort files when merge them for jumbo -- I not sure, if they feed to script in predictable order, so sorting forced in merger script)

/cc @domenkozar @volth

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Nov 5, 2018
@bendlas
Copy link
Contributor

bendlas commented Nov 14, 2018

I've just run a build with this PR and everything seems to work. I wonder about symbol_level=0, though. It makes around 40K of difference:

± ls -l /nix/store/sy8d74lm4l9azhy6x9yxdm3qlji61iip-chromium-70.0.3538.102/libexec/chromium/chromium
-r-xr-xr-x 1 root root 229089912 Jan  1  1970 /nix/store/sy8d74lm4l9azhy6x9yxdm3qlji61iip-chromium-70.0.3538.102/libexec/chromium/chromium
± ls -l /nix/store/yw7b922zp0q1lh5ibcpwy1ns4ky5x89v-chromium-70.0.3538.102/libexec/chromium/chromium
-r-xr-xr-x 1 root root 229047072 Jan  1  1970 /nix/store/yw7b922zp0q1lh5ibcpwy1ns4ky5x89v-chromium-70.0.3538.102/libexec/chromium/chromium

Could this affect crash reports in an way? (not that we seem to get any)

@avnik
Copy link
Contributor Author

avnik commented Nov 14, 2018

@bendlas comment in source tells --
How many symbols to include in the build. This affects the performance of
the build since the symbols are large and dealing with them is slow.
2 means regular build with symbols.
1 means minimal symbols, usually enough for backtraces only. Symbols with
internal linkage (static functions or those in anonymous namespaces) may not
appear when using this level.
0 means no symbols.
-1 means auto-set according to debug/release and platform.

Actually setting was taken from arch build (and I aim more on build speedup, than executable size -- because 6-8 hours builds is annoying)

avnik added 5 commits December 3, 2018 15:35
A little patch to jumbo script, which should improve reproducibility
by sorting source files before merge.
Use $SOURCE_DATE_EPOCH instead
Also fix spacing style to conform google style
@avnik avnik force-pushed the chromium-build-optimizations branch from 3bd1024 to 9ae406c Compare December 3, 2018 13:36
@bendlas bendlas merged commit 9ae406c into NixOS:master Mar 7, 2019
bendlas added a commit that referenced this pull request Mar 7, 2019
…:NixOS/nixpkgs into fix-chromium

fixes #49797

(cherry picked from commit 4901dc4)
bendlas added a commit that referenced this pull request Mar 7, 2019
adrianpk added a commit to adrianpk/nixpkgs that referenced this pull request May 31, 2024
adrianpk added a commit to adrianpk/nixpkgs that referenced this pull request May 31, 2024
…:NixOS/nixpkgs into fix-chromium

fixes NixOS#49797

(cherry picked from commit 4901dc4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants