Closed Bug 1900791 Opened 6 months ago Closed 6 months ago

A lot of time spent submitting glyph rasterization requests

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: nical, Assigned: nical)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

rayon::ThreadPool::install is rather costly, at least in frames where we call it a lot.

We'd previously install glyph requests on the thread pool as soon as we'd get 8 pending requests however that causes us too much communication with the workers from outside the thread pool, which is rather slow.

In addition, using ThreadPool::spawn instead of ThreadPool::install appears to be a lot faster.

These two changes add up to pretty substantial frame building perf improvements (around 3ms per frame that rasterize large amounts of glyhs like tab switches and pinch-zoom).

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa83ad843f07 Increase the glyph batch size to 32 and use ThreadPool::spawn. r=gfx-reviewers,lsalzman

Backed out for causing wrench bustages related to pkg lockfile.

[vcs 2024-06-10T22:53:31.550Z] 373571 files updated, 0 files merged, 0 files removed, 0 files unresolved
[vcs 2024-06-10T22:53:31.742Z] updated to 13bfcb4291310a8a57efff894d55cbcfa18be139
[vcs 2024-06-10T22:53:31.742Z] PERFHERDER_DATA: {"framework": {"name": "vcs"}, "suites": [{"extraOptions": ["projects/970387039909/machineTypes/c2-standard-16"], "hgVersion": "6.4.3", "lowerIsBetter": true, "name": "clone", "serverUrl": "hg.mozilla.org", "shouldAlert": false, "subtests": [], "value": 2.0938680171966553}, {"extraOptions": ["projects/970387039909/machineTypes/c2-standard-16"], "hgVersion": "6.4.3", "lowerIsBetter": true, "name": "update", "serverUrl": "hg.mozilla.org", "shouldAlert": false, "subtests": [], "value": 23.953728675842285}, {"extraOptions": ["projects/970387039909/machineTypes/c2-standard-16"], "hgVersion": "6.4.3", "lowerIsBetter": true, "name": "overall", "serverUrl": "hg.mozilla.org", "shouldAlert": false, "subtests": [], "value": 26.534371852874756}, {"extraOptions": ["projects/970387039909/machineTypes/c2-standard-16"], "hgVersion": "6.4.3", "lowerIsBetter": true, "name": "overall_pull", "serverUrl": "hg.mozilla.org", "shouldAlert": false, "subtests": [], "value": 26.534371852874756}, {"extraOptions": ["projects/970387039909/machineTypes/c2-standard-16"], "hgVersion": "6.4.3", "lowerIsBetter": true, "name": "overall_pull_fullcheckout", "serverUrl": "hg.mozilla.org", "shouldAlert": false, "subtests": [], "value": 26.534371852874756}, {"extraOptions": ["projects/970387039909/machineTypes/c2-standard-16"], "hgVersion": "6.4.3", "lowerIsBetter": true, "name": "overall_pull_emptywdir", "serverUrl": "hg.mozilla.org", "shouldAlert": false, "subtests": [], "value": 26.534371852874756}]}
[vcs 2024-06-10T22:53:32.013Z] TinderboxPrint:<a href=https://hg.mozilla.org/integration/autoland/rev/13bfcb4291310a8a57efff894d55cbcfa18be139 title='Built from autoland revision 13bfcb4291310a8a57efff894d55cbcfa18be139'>13bfcb4291310a8a57efff894d55cbcfa18be139</a>
[setup 2024-06-10T22:53:32.013Z] GECKO_PATH is /builds/worker/workspace/build/src
[setup 2024-06-10T22:53:32.013Z] MOZ_FETCHES_DIR is /builds/worker/fetches
[setup 2024-06-10T22:53:32.013Z] UPLOAD_DIR is /builds/worker/artifacts
[fetches 2024-06-10T22:53:32.013Z] fetching artifacts
[fetches 2024-06-10T22:53:32.013Z] executing ['/usr/bin/python3', '-u', '/builds/worker/workspace/build/src/taskcluster/scripts/misc/fetch-content', 'task-artifacts']
[fetches 2024-06-10T22:53:32.082Z] attempt 1/5
[fetches 2024-06-10T22:53:32.082Z] Downloading https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/H50PiP4oRBCH2GzuBcrcqg/artifacts/public/build/rustc.tar.zst to /builds/worker/fetches/rustc.tar.zst
[fetches 2024-06-10T22:53:32.082Z] Downloading https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/H50PiP4oRBCH2GzuBcrcqg/artifacts/public/build/rustc.tar.zst
[fetches 2024-06-10T22:53:33.368Z] https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/H50PiP4oRBCH2GzuBcrcqg/artifacts/public/build/rustc.tar.zst resolved to 305620640 bytes with sha256 7956bab97646a3b1ad191bece9797b57f6048e1549203e4310f33f1172fa175d in 1.286s
[fetches 2024-06-10T22:53:33.368Z] Verified size of https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/H50PiP4oRBCH2GzuBcrcqg/artifacts/public/build/rustc.tar.zst
[fetches 2024-06-10T22:53:33.368Z] Extracting /builds/worker/fetches/rustc.tar.zst to /builds/worker/fetches
[fetches 2024-06-10T22:53:35.945Z] /builds/worker/fetches/rustc.tar.zst extracted in 2.576s
[fetches 2024-06-10T22:53:35.945Z] Removing /builds/worker/fetches/rustc.tar.zst
[fetches 2024-06-10T22:53:35.981Z] PERFHERDER_DATA: {"framework": {"name": "build_metrics"}, "suites": [{"name": "fetch_content", "value": 3.9010131950008144, "lowerIsBetter": true, "shouldAlert": false, "subtests": []}]}
[fetches 2024-06-10T22:53:35.995Z] finished fetching artifacts
[task 2024-06-10T22:53:35.995Z] executing ['workspace/build/src/taskcluster/scripts/misc/wrench-deps-vendoring.sh']in /builds/worker
[task 2024-06-10T22:53:35.997Z] 
[task 2024-06-10T22:53:35.997Z] # This scripts uses `cargo-vendor` to download all the dependencies needed
[task 2024-06-10T22:53:35.997Z] # to build `wrench` (a tool used for standalone testing of webrender), and
[task 2024-06-10T22:53:35.997Z] # exports those dependencies as a tarball. This avoids having to download
[task 2024-06-10T22:53:35.997Z] # these dependencies on every test job that uses `wrench`.
[task 2024-06-10T22:53:35.997Z] 
[task 2024-06-10T22:53:35.997Z] UPLOAD_DIR=$HOME/artifacts
[task 2024-06-10T22:53:35.997Z] + UPLOAD_DIR=/builds/worker/artifacts
[task 2024-06-10T22:53:35.997Z] 
[task 2024-06-10T22:53:35.997Z] cd $GECKO_PATH
[task 2024-06-10T22:53:35.997Z] + cd /builds/worker/workspace/build/src
[task 2024-06-10T22:53:35.997Z] export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin:$HOME/.cargo/bin
[task 2024-06-10T22:53:35.997Z] + export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/builds/worker/fetches/rustc/bin:/builds/worker/.cargo/bin
[task 2024-06-10T22:53:35.997Z] + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/builds/worker/fetches/rustc/bin:/builds/worker/.cargo/bin
[task 2024-06-10T22:53:35.997Z] cd gfx/wr/
[task 2024-06-10T22:53:35.997Z] + cd gfx/wr/
[task 2024-06-10T22:53:35.997Z] mkdir .cargo
[task 2024-06-10T22:53:35.997Z] + mkdir .cargo
[task 2024-06-10T22:53:35.998Z] cargo vendor --locked --sync ./Cargo.toml > .cargo/config.toml
[task 2024-06-10T22:53:35.998Z] + cargo vendor --locked --sync ./Cargo.toml
[task 2024-06-10T22:53:36.020Z]     Updating git repository `https://github.com/jamienicol/glutin`
[task 2024-06-10T22:53:36.809Z]     Updating crates.io index
[task 2024-06-10T22:53:36.888Z]     Updating git repository `https://github.com/servo/osmesa-src`
[task 2024-06-10T22:53:46.881Z] error: failed to sync
[task 2024-06-10T22:53:46.881Z] 
[task 2024-06-10T22:53:46.881Z] Caused by:
[task 2024-06-10T22:53:46.881Z]   failed to load pkg lockfile
[task 2024-06-10T22:53:46.881Z] 
[task 2024-06-10T22:53:46.881Z] Caused by:
[task 2024-06-10T22:53:46.881Z]   the lock file /builds/worker/workspace/build/src/gfx/wr/Cargo.lock needs to be updated but --locked was passed to prevent this
[task 2024-06-10T22:53:46.881Z]   If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.
[taskcluster 2024-06-10 22:53:58.759Z] === Task Finished ===
[taskcluster 2024-06-10 22:53:58.815Z] Artifact "public/build" not found at "/builds/worker/artifacts/": (HTTP code 404) no such container - Could not find the file /builds/worker/artifacts/ in container 40307493485f84e60817a3b40284567d1611145981929f4e916e2d538f68c786 
[taskcluster 2024-06-10 22:53:58.874Z] Unsuccessful task run with exit code: 101 completed in 81.523 seconds
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(nical.bugzilla)
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96066f461f86 Increase the glyph batch size to 32 and use ThreadPool::spawn. r=gfx-reviewers,lsalzman
Regressions: 1901884
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Regressions: 1901887
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: