Closed Bug 1899118 Opened 1 year ago Closed 1 year ago

Slow scroll frames caused by glyph atlas allocation

Categories

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

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In particular while pinch-zooming, I've found that a lot of frame building time is sometimes spent allocating rectangles in the glyph atlas.

Profile: https://share.firefox.dev/3yBeKzs

The time appears to be spent accessing a large number of slots in the atlas to check whether the sot is available and large enough to host the allocation. It should be possible to speed this up by adding some sort of per-shelf acceleration structure.

It contains a big perf improvement for atlases with many items.

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/afb5f06b1769 Update etagere to 0.2.11. r=gfx-reviewers,supply-chain-reviewers,jrmuizel

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/816059c11a5c Update etagere to 0.2.11. r=gfx-reviewers,supply-chain-reviewers,jrmuizel
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: