You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Pasted images over 2000 px stall on "Preparing" for over a second when the page is busy #42362
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Open a thread in the desktop app (seen on Linux with a 240 Hz display).
Keep the page busy for a few milliseconds every frame, for example from DevTools: (function f(){const t=performance.now();while(performance.now()-t<4);requestAnimationFrame(f)})()
Paste a screenshot whose long edge is over 2000 px.
Expected behavior
The image tile leaves "Preparing" in about 0.1 s, as it does on an idle page and in the macOS app.
Actual behavior
The tile stays on "Preparing" for about 1.15 s, and a HEIC photo for about 1.5 s. Images of 2000 px or less are not affected.
In everyday use on this Linux machine, most large screenshots sat on "Preparing" for a second or more. The busy page above is the reliable way I found to reproduce it.
Images over 2000 px are resized and re-encoded with OffscreenCanvas.convertToBlob on the main thread, and the composer thumbnail is encoded there too. Chromium runs main-thread canvas encodes as idle tasks (CanvasAsyncBlobCreator). When the page has no idle time, each encode waits for the 1 s fallback (kIdleTaskStartTimeoutDelayMs). In a worker, Chromium encodes right away.
Activity