Skip to content

[Bug] Slow reaction to large file #5860

Closed

Description

@netsonicyxf

Description

As the title says, things become slow down even freeze for seconds when the markdown file is large. In my case is a file is about 260kB.

Steps to Reproduce

  1. Open Markdown Text
  2. Open a large markdown file (260kB in my case), and several smalll markdown files (about 20kB in my case).
  3. Switching between tab of smalll markdown file to tab of large markdown file takes about 6-7s

Expected Behavior

Fast response for the UI.

Actual Behavior

Slow or Freeze

Screenshots / Logs

No response

Operating System

Windows

MarkText Version

0.23.0

OS Version

win 11

Reproducibility

  • I can reliably reproduce this issue

Activity

  1. Jocs commented on Oct 23, 2026

    @Jocs
    Member

    Please attach a demo large file.

  2. added
    🚧 needs triage
    on Oct 23, 2026
  3. netsonicyxf commented on Oct 23, 2026

    @netsonicyxf
    Author

    here you are
    SKILL.md

  4. Jocs commented on Oct 23, 2026

    @Jocs
    Member

    Thanks for attaching the file. I tested your original 265,184-byte attachment in a built Electron application on macOS, alternating between it and a roughly 20 KB document.

    On the current development branch (0.24.0-dev), before the changes in #5863, switching to your large file took 425–451 ms across four samples (mean 436.3 ms). With #5863, it took 289–328 ms (mean 308.9 ms), approximately 29% less time. Both runs used the same machine and CPU profiling; timing covers tab activation through two animation frames.

    The profile showed avoidable work from rewriting unchanged editability attributes and hiding/showing the editor around scroll restoration. #5863 removes those redundant updates and the extra layout work. Regression tests cover repeated large-table tab switches, scroll restoration, and read-only behavior.

    Two related performance improvements have also recently merged into develop, after the 0.23.0 release:

    The development-branch baseline above already includes both improvements. I did not benchmark 0.23.0 against them, so these measurements cannot quantify their contribution to your reported delay.

    I could not reproduce the 6–7 second freeze reported on Windows 11 / 0.23.0 in this macOS / current-development-branch environment. There is confirmed overhead worth fixing, but this is not verification that your exact Windows scenario is fully resolved. Local validation passed: 2,871 Muya unit tests, 1,209 desktop unit tests, 7 targeted Electron tests, builds, lint, and type checks.

    #5863 is being linked to close this issue when merged. Please retest with a build containing these changes; if the multi-second freeze remains on Windows, please reopen this issue with the tested version and hardware details so we can investigate that remaining case.

  5. added a commit that references this issue on Oct 23, 2026
    a6a7843
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

    🚧 needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions