Skip to content

Firefox compile time regression #43211

@glandium

Description

@glandium
Contributor

Preliminary note: this may or may not be related to #43141, but just in case, I file this separately instead of piling up there.

I'm sorry I don't have much more fine-grained data at the moment, but -Ztime-passes, when multiple things are built in parallel (while building Firefox), is not entirely helpful, because it doesn't tell to which crate the interleaving numbers belong to.

Rust build times on Firefox are already bad with 1.18. Some of the most time consuming crates have build times that look like the following:

  • 74.992975322 webrender
  • 99.960699075 geckoservo
  • 259.393332042 gkrust
  • 259.639402886 gkrust_gtest
  • 363.456949809 style

With the latest nightly as of writing (1.20.0-nightly (f85579d 2017-07-12)), those times become:

  • 85.71714646 webrender
  • 124.097890719 geckoservo
  • 384.619852505 gkrust_gtest
  • 396.106775997 gkrust
  • 455.281318295 style

I'm trying to narrow it down to older nightlies, but it started badly, because I got an ICE building the style crate on the last 1.18.0 nightly (2017-04-29)

Those are times for --release with lto enabled (I have a separate bug to file about lto, but I don't think that's relevant to this regression).

CC: @froydnj, @rillian

Activity

glandium

glandium commented on Jul 13, 2017

@glandium
ContributorAuthor

Mmmmm with 1.19.0-nightly (75b0568 2017-05-15):

  • 60.430645418 webrender
  • 116.540179527 0 geckoservo
  • 370.565763687 0 gkrust_gtest
  • 372.559032193 0 gkrust
  • 433.088609909 0 style

With 1.19.0-nightly (d3abc80 2017-05-09):

  • 63.26174462 webrender
  • 117.30302075 geckoservo
  • 319.482715603 gkrust
  • 320.997348082 gkrust_gtest
  • 387.128239057 style

There would seem to be different regression points for different things, and early in the 1.19 development, at that (I tried 75b0568 because of range given in #43141 )

Also note that the order in which the mentioned crates are built is webrender, style, geckoservo, gkrust, gkrust_gtest (the last two are interchangeable depending on timing), and are all happening sequentially because, to simplify things, they are a dependency chain (except webrender, which may build in parallel of style, but it's not like it would matter much).

Also note that this long tail of builds takes so long that by the time geckoservo starts to build after style, there's only that happening on the build machine (everything C++ that doesn't depend on rust is done), and in fact, style has been the only thing happening on the build machine for a while too...

added
I-compiletimeIssue: Problems and improvements with respect to compile times.
on Jul 13, 2017
glandium

glandium commented on Jul 13, 2017

@glandium
ContributorAuthor

Note, I'm not excluding that as a counterpart, the resulting builds might have better code, but I haven't verified that (and I don't know which specific tests in the Firefox test suites would tell me that about the rust code)

alexcrichton

alexcrichton commented on Jul 13, 2017

@alexcrichton
Member

cc @rust-lang/compiler

arielb1

arielb1 commented on Jul 13, 2017

@arielb1
Contributor

@glandium

I remember that LLVM 4.0 introduced a 10% regression in LLVM passes time, but that was #40123 (merged Apr 24).

added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Jul 13, 2017
brson

brson commented on Jul 13, 2017

@brson
Contributor

P-?

michaelwoerister

michaelwoerister commented on Jul 17, 2017

@michaelwoerister
Member

It would be interesting to know if turning off LTO makes a difference here.

nikomatsakis

nikomatsakis commented on Jul 17, 2017

@nikomatsakis
Contributor

More data points would also be useful -- how hard are they to gather?

glandium

glandium commented on Jul 17, 2017

@glandium
ContributorAuthor

What kind of data points? Different versions? Different configurations?

michaelwoerister

michaelwoerister commented on Jul 17, 2017

@michaelwoerister
Member

@glandium Different Rust versions, yes, and if possible, timings for specific passes.

michaelwoerister

michaelwoerister commented on Jul 17, 2017

@michaelwoerister
Member

Some more questions:

  • Can you give some instructions on how to build Firefox with Stylo enabled? Is it just ./mach build?
  • Does FF use the system provided Rust? I.e. can I just switch the Rust version via rustup and expect the FF build system to pick that up?
  • Where does the Rust code in FF live? (I tried changing files in the servo subdirectory but that did not seem to do anything)

25 remaining items

alexcrichton

alexcrichton commented on Aug 11, 2017

@alexcrichton
Member

@arielb1 I haven't had much time personally to look into the allocator-related regressions yet. Where'd you find the 5% number from, though? Is there perhaps a suspect commit on perf.rust-lang.org?

arielb1

arielb1 commented on Aug 13, 2017

@arielb1
Contributor

@alexcrichton

That's from @glandium's numbers

                1.18     1.19     1.20
webrender      40.06s   39.61s   44.87s
clap           40.08s   53.27s   57.75s
bindgen        44.31s   44.47s   44.46s
geckoservo     77.14s   77.32s   84.46s
syntex_syntax  105.02s  103.19s  96.80s
gkrust         128.17s  132.96s  140.84s
gkrust_gtest   128.72s  134.81s  141.59s
style          187.41s  188.26s  206.54s

style was affected by #43572, but for the other crates it looks like about 5%

nikomatsakis

nikomatsakis commented on Aug 17, 2017

@nikomatsakis
Contributor

triage: P-medium

Discussed this in the @rust-lang/compiler meeting. We decided to downgrade this to P-medium, since the immediate problem has been resolved, though we will want to revisit (and perhaps upgrade priority again) in the future.

added and removed
P-highHigh priority
on Aug 17, 2017
modified the milestone: 1.20 on Aug 23, 2017
added
regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
and removed on Aug 28, 2017
alexcrichton

alexcrichton commented on Aug 28, 2017

@alexcrichton
Member

1.20 will soon be stable

removed their assignment
on Oct 31, 2017
cyplo

cyplo commented on Apr 15, 2018

@cyplo
Contributor

Heya !
Some perf improvements landed in 2018, including incremental compilation, I wonder if they helped in this case ?

Enselic

Enselic commented on Sep 28, 2023

@Enselic
Member

Triage: No one said it did not help, so let's assume it did! Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-compiletimeIssue: Problems and improvements with respect to compile times.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jdm@sanxiyn@alexcrichton@Enselic@brson

        Issue actions

          Firefox compile time regression · Issue #43211 · rust-lang/rust