AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

[Bug]: Significant lag when opening or interacting with large documents in AFFiNE.

Open letlaa opened this issue 7 months ago • 1 comments

What happened?

Observed Behavior:

  • Opening a document of approximately 5 000 characters (roughly 5 KB) triggers noticeable input delay: characters appear only after a pause of several hundred milliseconds. Cursor movement is sluggish, and scrolling feels choppy.
  • Loading a single-page Markdown file of around 600 KB (tens of thousands of lines) takes several seconds. Once loaded, any typing, deletion, or text selection exhibits severe lag:
  • Every keystroke registers several hundred milliseconds late.
  • Scrolling through the document causes frame drops and temporary “freezes” before new content appears.
  • Deleting or moving large blocks of text can make the entire browser unresponsive, occasionally triggering “page is not responding” warnings.
  • Even minor edits—such as inserting or deleting a few words—induce multi-second pauses while the editor attempts to re-render the entire document.
  • Cursor placement often “jumps” or fails to update immediately, requiring multiple clicks or keystrokes before the editor recognizes the action.
  • The document outline (heading list) briefly appears but takes several seconds to synchronize with the full content, causing a mismatch between visible text and the table of contents.
  • Switching between Page Mode and Canvas Mode on a large document takes 5–10 seconds (or more), during which the UI is completely unresponsive.

These performance issues occur consistently on a MacBook Air M1 running AFFiNE v0.21.6 in a self-hosted setup, making it effectively impossible to edit or navigate large files without severe delays.

Distribution version

macOS ARM 64 (Apple Silicon)

App Version

0.21.6

What browsers are you seeing the problem on if you're using web version?

No response

Are you self-hosting?

  • [x] Yes

Self-hosting Version

0.21.6

Relevant log output


Anything else?

No response

letlaa avatar Jun 01 '25 15:06 letlaa

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

affine-issue-bot[bot] avatar Jun 01 '25 15:06 affine-issue-bot[bot]

same behavior on Window x64

Beeditor04 avatar Jun 19 '25 02:06 Beeditor04

I experience the same behavior on a MacBook Air, M2. Please fix

michivonah avatar Aug 31 '25 08:08 michivonah