Closed Bug 2074166 Opened 2 months ago Closed 2 months ago

Rust code starts building a lot later after bug 2047566

Categories

(Data Platform and Tools :: Glean: SDK, defect)

defect

Tracking

(firefox158 fixed)

RESOLVED FIXED
Tracking Status
firefox158 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Regression)

Details

(Keywords: perf-alert, regression)

Attachments

(1 external file)

Before bug 2047566, gkrust code started to build right around dom/canvas here.

After bug 2047566 it starts getting built all the way to the end.

Pretty sure this is probably the root cause of bug 2073487?

Flags: needinfo?(jrediger)

I don't know enough about the build system to say why that is.
We did add a build script and a dependency on mozbuild, to link against the sqlite library. Could that have influenced it?
If not then it might be related to the uniffi update maybe, or changes from appservices?

Flags: needinfo?(jrediger)

Alex and I have learned a lot about these details while working on the a-s monorepo. Alex, is it obvious how to address this? (It's not obvious to me; I'd have to dig into the Rust target ordering details.)

Flags: needinfo?(ahochheiden)

It seems https://searchfox.org/firefox-main/rev/99f2f8d691af521b71ef2ada549f4da708aa2f0d/toolkit/library/rust/moz.build#52-56 causes this to get added to the make rules:

toolkit/library/rust/target-objects: security/target

Why is that needed? For tests?

Seems we could do something similar to bug 1958000?

See Also: → 1958000
Assignee: nobody → emilio
Status: NEW → ASSIGNED

(In reply to Emilio Cobos Álvarez [:emilio] from comment #3)

It seems https://searchfox.org/firefox-main/rev/99f2f8d691af521b71ef2ada549f4da708aa2f0d/toolkit/library/rust/moz.build#52-56 causes this to get added to the make rules:

toolkit/library/rust/target-objects: security/target

Why is that needed? For tests?

Because Glean uses SQLite and it wants to use the one bundled in m-c. Which apparently can come through nss.

(In reply to Emilio Cobos Álvarez [:emilio] from comment #4)

Seems we could do something similar to bug 1958000?

Huh, that's really recent, so I didn't know about it. Maybe that can work.

(Note: for the moment we're disabling the sqlite use again [bug 2074141], I haven't removed the feature flag though, so it still does the linking. We eventually need it back anyway, but we could remove it for the current nightly if that helps)

comment 5 seems to work for me, I pushed to try to confirm it doesn't break anything.

I think Emilio's fix is correct. USE_LIBS for a RustLibrary just adds a build ordering dependency, which made gkrust wait for NSS to finish. Since link_sqlite() only runs with the mozbuild-rustlib feature and that's only enabled for rusttests, we don't need that ordering dependency for the main build.

Flags: needinfo?(ahochheiden)
See Also: → 2074237
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ecd323dc71d7 https://hg.mozilla.org/integration/autoland/rev/dd25bb7675d4 Avoid making all of gkrust depend on nss builds. r=firefox-build-system-reviewers,ahochheiden
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED

Perfherder has detected a build_metrics performance change from push dd25bb7675d48a00addb6ee4d396631856693cf9.

No action is required from the author; this comment is provided for informational purposes only.

Improvement Test Platform Options Absolute values [old vs new]
5% build times osx-aarch64-nightlyasrelease nightly nightly-as-release taskcluster-projects/970387039909/machineTypes/c3d-standard-16-lssd 3,451.86 -> 3,284.89
4% build times linux64-nightlyasrelease nightly nightly-as-release taskcluster-projects/970387039909/machineTypes/c3d-standard-60-lssd 2,844.68 -> 2,720.65
4% build times osx-nightlyasrelease nightly nightly-as-release taskcluster-projects/970387039909/machineTypes/c3d-standard-16-lssd 3,438.18 -> 3,301.28
4% build times linux64-shippable nightly taskcluster-projects/970387039909/machineTypes/c3d-standard-60-lssd 2,901.76 -> 2,787.53
4% build times win64-nightlyasrelease nightly nightly-as-release taskcluster-projects/970387039909/machineTypes/c3d-standard-60-lssd 3,468.90 -> 3,343.38
3% build times linux64 plain taskcluster-projects/970387039909/machineTypes/c3d-standard-16-lssd 1,876.19 -> 1,825.27

Need Help or Information?

If you have any questions, please reach out to fbilt@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

Keywords: perf-alert
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: