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] Severe Bug: App freezes indefinitely when opening large Markdown files (~300k words) #4887
I am experiencing a critical performance issue when trying to open large Markdown documents in MarkText. When I attempt to open a file containing approximately 300,000 words, the application completely freezes. Even after waiting for 4 to 5 minutes, the UI remains totally unresponsive, and the file never successfully loads. Ultimately, I have to force-close the application.
For comparison, when I open the exact same file in Obsidian, it loads in just a few seconds without any lag. It seems MarkText might be struggling to parse and render the entire DOM at once, leading to an infinite hang or memory bottleneck.
Steps to Reproduce
Create a large Markdown file containing around 300,000 words (or a file size of a few megabytes).
Open the file using MarkText.
Observe the behavior: the application freezes completely and remains unresponsive even after waiting for over 5 minutes.
Expected Behavior
The application should load large files reasonably fast (within a few seconds) and maintain a smooth editing experience, similar to other modern Markdown editors, without crashing or freezing indefinitely.
Actual Behavior
The application freezes indefinitely upon opening the file. The UI becomes completely unresponsive, making it impossible to edit the document or even use the app, forcing a manual termination (Force Quit/End Task) of the software.
Opening a very large document blocking the whole UI is a known limitation rather than a new bug: it is already tracked in #3518 (app hangs/crashes when opening large files) and #3640 (large-file editing performance). Both describe the same shape you hit — the document is parsed and rendered in one pass, so a multi-megabyte file freezes the window until it finishes.
0.20 replaces the editor engine (@muyajs/core), which makes large documents considerably cheaper, but it does not virtualize rendering yet, so very large files are still slow — a v0.20.0-rc.1 report of the same problem (#5115) is being folded into the same thread.
Closing as a duplicate of #3518. If you can share the file, or its rough shape (number of paragraphs, tables, images, code blocks), please attach it there: a concrete profiling target is what that issue is missing.
@Renakoni — thanks for offering to take this on; please work against #3518 so the profiling and any fix stay in the thread that collects all the large-file reports.
Activity
kannibalk1w1 commentedon Jul 11, 2026
also having this issue
Renakoni commentedon Jul 16, 2026
I'd like to take a crack at this
fix(muya): walk lexed tokens with a linear driver (marktext#4887)
feat(muya): mount large documents in scheduled chunks (marktext#4887)
feat(muya): mount large documents in scheduled chunks (marktext#4887)
fix(muya): remove the quadratic open-path costs (marktext#4887)
feat(muya): progressively mount large documents (marktext#4887)
feat(muya): progressively mount large documents (marktext#4887)
feat(muya): progressively mount large documents (marktext#4887)
feat(muya): progressively mount large documents (marktext#4887)
feat(muya): progressively mount large documents (marktext#4887)
feat(muya): progressively mount large documents (marktext#4887)
perf(muya): collapse redundant per-keystroke tokenization in inputHan…
Jocs commentedon Sep 18, 2026
Thanks for the report.
Opening a very large document blocking the whole UI is a known limitation rather than a new bug: it is already tracked in #3518 (app hangs/crashes when opening large files) and #3640 (large-file editing performance). Both describe the same shape you hit — the document is parsed and rendered in one pass, so a multi-megabyte file freezes the window until it finishes.
0.20 replaces the editor engine (
@muyajs/core), which makes large documents considerably cheaper, but it does not virtualize rendering yet, so very large files are still slow — a v0.20.0-rc.1 report of the same problem (#5115) is being folded into the same thread.Closing as a duplicate of #3518. If you can share the file, or its rough shape (number of paragraphs, tables, images, code blocks), please attach it there: a concrete profiling target is what that issue is missing.
@Renakoni — thanks for offering to take this on; please work against #3518 so the profiling and any fix stay in the thread that collects all the large-file reports.
feat(muya): progressively mount large documents (marktext#4887)
fix(muya): remove the quadratic costs that freeze large documents (#4887