Only install visual metrics packages in the raptor virtualenv when visual metrics run
Categories
(Testing :: Raptor, enhancement, P1)
Tracking
(firefox161 fixed)
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: aglavic, Assigned: aglavic)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 external file)
|
67.19 KB,
image/png
|
Details |
While experimenting with a local test-harness profiler I created, I found that the mozharness raptor script (testing/mozharness/mozharness/mozilla/testing/raptor.py) installs numpy, Pillow, scipy, opencv-python and pyssim for every browsertime task, even when the task doesn't compute visual metrics. On Android hardware these wheels (about 115 MiB) are downloaded on every run because the uv cache is always cold.
The packages should only be installed when browsertime_visualmetrics is set (or for local runs).
Measured on try with 3 runs per task across all Android browsertime tasks that skip visual metrics:
| Device | create-virtualenv before | after | saved |
|---|---|---|---|
| a55 | 46.7 s | 14.8 s | 31.9 s |
| s24 | 75.8 s | 35.2 s | 40.6 s |
| p6 | 75.1 s | 36.4 s | 38.7 s |
We can save 30 seconds roughly per android job that does not require visual metrics this way. A nice small performance win!
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Most browsertime tasks don't compute visual metrics, but every run installed
numpy, Pillow, scipy, opencv-python and pyssim, which Android hardware
downloads each time.
Raptor's geometric mean used scipy, so it now uses the statistics module,
keeping scipy's results for empty, negative and zero input.
Comment 7•1 month ago
|
||
| bugherder | ||
| Assignee | ||
Comment 8•25 days ago
|
||
Description
•