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.
Figure out why CodeMirror is so much faster at responding to significant damage in the editor.
Potential problem areas:
Too many styling passes:
To avoid hanging the UI, the styler does 50ms or 800 lines' worth of styling, then pauses for 75ms. This is too conservative; it takes a long time to finish a large file.
Generating too much garbage:
Profiling shows anywhere from 13–30% time spent in GC. Some of this is due to plugin-communication overhead, but I may be allocating too much crap while parsing or something.
Data structures:
When styling a line of code like this:
varfizzbuzz;
CodeMirror internally represents the line's style as an array of alternating token and text-fragment:
["keyword","var",null," ","variable","fizzbuzz"]
The Orion-codemirror highlighter instead stores a range of token+line indices, and no text:
[[0,3,"keyword"],[4,12,"variable"]]
Perhaps the extra level of arrays here is increasing pressure on the VM and making it slower???
The text was updated successfully, but these errors were encountered:
Figure out why CodeMirror is so much faster at responding to significant damage in the editor.
Potential problem areas:
Too many styling passes:
To avoid hanging the UI, the styler does 50ms or 800 lines' worth of styling, then pauses for 75ms. This is too conservative; it takes a long time to finish a large file.
Generating too much garbage:
Profiling shows anywhere from 13–30% time spent in GC. Some of this is due to plugin-communication overhead, but I may be allocating too much crap while parsing or something.
Data structures:
When styling a line of code like this:
CodeMirror internally represents the line's style as an array of alternating token and text-fragment:
The Orion-codemirror highlighter instead stores a range of token+line indices, and no text:
Perhaps the extra level of arrays here is increasing pressure on the VM and making it slower???
The text was updated successfully, but these errors were encountered: