Skip to content

[Bug]: Pasted images over 2000 px stall on "Preparing" for over a second when the page is busy #42362

Done

Description

@fdzalex

Before submitting

  • 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

  1. Open a thread in the desktop app (seen on Linux with a 240 Hz display).
  2. 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)})()
  3. 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.

Impact

Minor bug or occasional failure

Version or commit

0.1.12-nightly.20261123.5151 (856b105)

Environment

Linux desktop AppImage (Electron 44.10.1, Chromium 152), Hyprland on Wayland, 240 Hz display

Workaround

Paste images whose long edge is 2000 px or less.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions