Closed Bug 1858640 Opened 2 years ago Closed 2 years ago

Generating Glean files takes a large part of the time in no-op builds

Categories

(Toolkit :: Telemetry, defect)

defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox118 --- unaffected
firefox119 --- unaffected
firefox120 --- fixed

People

(Reporter: florian, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Here's a profile of a no-op build on my M1 Max macbook pro: https://share.firefox.dev/3PUojyb

Here's the list of glean files that were generated during that no-op build and how long it took to generate them: https://share.firefox.dev/3RTC3fm

Note that the GleanMetrics.h and GleanPings.h files are generated twice, once during the export phase, and one during the compile phase.

If it's a no-op build, then the GeneratedFile's deps shouldn't have been changed so the script to generate e.g. GleanPings.h should never have been called, right? (Asking :nalexander, who's shown some facility with this directive in the recent past)

Florian: Is this new (since, say, bug 1852869)?

Flags: needinfo?(nalexander)
Flags: needinfo?(florian)
See Also: → 1852869

REBUILD_CHECK=1 ./mach build shows:

 0:00.72 Rebuilding toolkit/components/glean/.deps/EventGIFFTMap.h.stub because metrics_index.py was removed
 0:00.74 Rebuilding toolkit/components/glean/.deps/HistogramGIFFTMap.h.stub because metrics_index.py was removed
 0:00.76 Rebuilding toolkit/components/glean/.deps/ScalarGIFFTMap.h.stub because metrics_index.py was removed
 0:00.79 Rebuilding toolkit/components/glean/api/src/.deps/factory.rs.stub because metrics_index.py was removed

This comes from https://searchfox.org/mozilla-central/rev/7d77ff808f8407a3e4fc0911779da446c050f9ee/toolkit/components/glean/build_scripts/glean_parser_ext/run_glean_parser.py#27

Flags: needinfo?(nalexander)
Flags: needinfo?(florian)
Keywords: regression
Regressed by: 1852869

It is imported by the script, so will be picked automatically, while the
manual dep doesn't currently contain the full path, and actually points
to a file that doesn't exist, making the script run every time.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED

(In reply to Chris H-C :chutten from comment #1)

Florian: Is this new (since, say, bug 1852869)?

Yes, here's a profile with the patch from bug 1852869 reverted: https://share.firefox.dev/3FlMFvT

(FYI, if you want to generate similar profiles to verify a patch, you'll need the patches from bug 1850647, currently on autoland)

Set release status flags based on info from the regressing bug 1852869

Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/7aa62c4f81e6 Remove metrics_index.py from the manual deps. r=nalexander
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: