Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance #2

Closed
mamacdon opened this issue Nov 28, 2011 · 1 comment
Closed

Performance #2

mamacdon opened this issue Nov 28, 2011 · 1 comment
Assignees

Comments

@mamacdon
Copy link
Owner

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:

var fizzbuzz;

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???

@ghost ghost assigned mamacdon Nov 29, 2011
@mamacdon
Copy link
Owner Author

Moved over to Bugzilla since nobody pays attention to the Issues on here

https://bugs.eclipse.org/bugs/show_bug.cgi?id=365128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant