Skip to content

Commit 1979f0d

Browse files
committed
Reduce StreamParser chunk size
FIX: Make the stream parser user 4 times smaller chunks to reduce the amount of re-parsed code on changes. See https://discuss.codemirror.net/t/old-language-mode-used-in-codemirror-v6-triggers-full-re-parse-of-the-entire-document/9384
1 parent ca8d6be commit 1979f0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stream-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function findStartInFragments<State>(lang: StreamLanguage<State>, fragments: rea
181181
}
182182

183183
const enum C {
184-
ChunkSize = 2048,
184+
ChunkSize = 512,
185185
MaxDistanceBeforeViewport = 1e5,
186186
MaxIndentScanDist = 1e4,
187187
MaxLineLength = 1e4

0 commit comments

Comments
 (0)