Add performance metrics for client-side media processing#76792
Add performance metrics for client-side media processing#76792adamsilverstein wants to merge 2 commits intotrunkfrom
Conversation
Add a new performance test that measures decode, resize, and encode time for generating all WordPress default sub-sizes (thumbnail, medium, medium_large, large, 1536x1536, 2048x2048) from JPEG, WebP, and AVIF source images using @wordpress/vips. This enables tracking regressions in the client-side image processing pipeline on codevitals.run, particularly for expensive formats like AVIF.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 7.66 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 9125d17. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23518548063
|
- Check SharedArrayBuffer availability instead of crossOriginIsolated (Document-Isolation-Policy does not set the crossOriginIsolated flag) - Add --enable-features=SharedArrayBuffer to Playwright launch args - Navigate to editor on each iteration so the import map is available - Create fresh buffer copies per resize to avoid detached ArrayBuffer - Regenerate AVIF test image for wasm-vips codec compatibility
Initial Performance Results (Local — Apple Silicon)Results from running 10 samples collected per format (1 throwaway warm-up excluded). Summary
Key Observations
Raw Data (10 samples each, in ms)JPEGWebPAVIFTest Environment
|
Summary
Adds a new performance test that measures client-side image processing time (decode → resize → encode) for generating all WordPress default sub-sizes from JPEG, WebP, and AVIF source images.
test/performance/specs/media-processing.spec.js@wordpress/vips/workerfunctions viapage.evaluate()in the editor contextmediaProcessingJpeg,mediaProcessingWebp,mediaProcessingAvifCloses #76789
Test plan