Long notes getting slow? Keep one long note fast as plain text

Short answer

The problem

A work log that gets a few lines every day grows fast. The person who wrote this guide keeps one that is now about 26,000 lines, close to 1 MB.

In online documents, notes and wikis, a note this long became heavy. Typing lagged behind the keys. Splitting the log into pages would fix the speed, but then it is no longer one place to scroll through and search.

Why long notes get slow

Many online editors turn every line or block of a note into its own part of the web page. A short note has a few dozen parts. A long note has thousands, and the browser has to keep all of them up to date.

Each keystroke changes the note, and the editor then updates the page. When the page holds the whole note, that work grows with the length of the note, not with what you can see. This is why the common answer is "split it up".

Keep one long note fast

An editor can instead draw only the part of the note that is on the screen, plus a little around it. The note can grow, but the work for each keystroke stays about the same.

CodeMirror, an open source code and text editor for the web, works this way. Its official guide says it this way:

“To keep the editor responsive and resource use low, it will, when updating, detect which part of the content is currently visible (not scrolled out of view), and only render that plus a margin around it.”

That is from the “Viewport” section of the CodeMirror System Guide.

Two things to know:

Set it up

Doing this with PlainHub

PlainHub is an online editor for files in your own GitHub repositories. Its editor is built on CodeMirror 6, so it draws only the lines on the screen:

Try it without signing in

FAQ

Do I have to split my long note?
No. Split it when it helps you find things, not because the editor gets slow.

Is the whole file loaded?
Yes. The editor reads the whole file. Only the drawing is limited to what is on the screen.

Does it have to be Markdown?
No. Any text file works. Markdown (.md) is a good choice because GitHub shows it formatted.


Sources

Checked: 2026-11-01