Description
During testing of the client-side media processing feature (tracked in #74333), several reports of crashes, console errors, and potential out-of-memory issues have surfaced. These need to be investigated and resolved before wider release. Additionally, we currently lack any benchmarking tooling to establish baseline expectations for processing times, making it difficult to distinguish real regressions from normal variance.
Observed Issues
1. Console errors during AVIF processing
When uploading AVIF images, console errors are consistently produced during conversion. From @sgomes' testing on WordPress 7.0 Beta 5:
These conversions always result in console errors as well, so it's unclear whether they succeeded.
Errors were confirmed across both an M4 Pro MacBook Pro and an HP Chromebook 14 G7.
2. Out-of-memory crashes after repeated uploads
When performing multiple image conversions in succession, out-of-memory crashes occur. @sgomes observed this on the wasm-vips playground and in WordPress:
After a few runs I start getting crashes with out of memory errors (DevTools were closed until it crashed).
This happens on both powerful and modest machines, though it takes more runs to trigger on higher-spec hardware. This suggests memory is not being properly freed between processing runs.
3. HEIC file processing crash
@adamziel reported that processing a HEIC file crashed entirely:
Processing a HEIC file crashed. I've added a client-side script override and then it hang without any photo preview.
4. No benchmarking tooling for processing performance
@sgomes' stopwatch measurements on a MacBook showed variance in end-to-end upload times (particularly for AVIF), but without tooling to isolate client-side processing time from upload time and other factors, it's hard to draw conclusions from these numbers alone. The wasm-vips playground handles AVIF-to-JPEG conversion in ~2.7s on a Chromebook, so we know the underlying library is fast — but we need proper benchmarks to understand where time is actually spent in our integration.
We need benchmarking tooling in tests for client-side media processing to:
- Establish baseline expectations for how long each format/size combination should take to process
- Isolate processing time from upload time so we can measure each independently
- Detect performance regressions in CI
- Provide data-driven answers instead of relying on manual stopwatch measurements
Steps to Reproduce
- Open WordPress 7.0 Beta 5 (or a Gutenberg build with client-side media enabled)
- Create a new post
- Upload an AVIF image and check for console errors
- Upload several more images (AVIF or JPEG) in succession — note potential crashes
- Try uploading a HEIC image — success, error, or crash?
Test files from #74333:
Investigation Areas
Related
Description
During testing of the client-side media processing feature (tracked in #74333), several reports of crashes, console errors, and potential out-of-memory issues have surfaced. These need to be investigated and resolved before wider release. Additionally, we currently lack any benchmarking tooling to establish baseline expectations for processing times, making it difficult to distinguish real regressions from normal variance.
Observed Issues
1. Console errors during AVIF processing
When uploading AVIF images, console errors are consistently produced during conversion. From @sgomes' testing on WordPress 7.0 Beta 5:
Errors were confirmed across both an M4 Pro MacBook Pro and an HP Chromebook 14 G7.
2. Out-of-memory crashes after repeated uploads
When performing multiple image conversions in succession, out-of-memory crashes occur. @sgomes observed this on the
wasm-vipsplayground and in WordPress:This happens on both powerful and modest machines, though it takes more runs to trigger on higher-spec hardware. This suggests memory is not being properly freed between processing runs.
3. HEIC file processing crash
@adamziel reported that processing a HEIC file crashed entirely:
4. No benchmarking tooling for processing performance
@sgomes' stopwatch measurements on a MacBook showed variance in end-to-end upload times (particularly for AVIF), but without tooling to isolate client-side processing time from upload time and other factors, it's hard to draw conclusions from these numbers alone. The
wasm-vipsplayground handles AVIF-to-JPEG conversion in ~2.7s on a Chromebook, so we know the underlying library is fast — but we need proper benchmarks to understand where time is actually spent in our integration.We need benchmarking tooling in tests for client-side media processing to:
Steps to Reproduce
Test files from #74333:
Investigation Areas
wasm-vipsplayground performanceRelated