-
Notifications
You must be signed in to change notification settings - Fork 93
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
Use of Tree line tracker in incremental mode #448
Conversation
When text changed, the TextDocument must update:
Before this PR, incremental mode used ListLineTracker which was recreated each time that text changed (compute of the all lines). This PR uses now TreeLineTracker to update line informations where text changed (kind of incremental mode for line informations computing). To see the performance in action with tree line tracker, you can execute the TextDocumentUpdatePerformance . This test inserts a space in the nasa.xml in a loop.
The explanation of this improve of performance is that the update of line informations is done with a replace method in tree line tracker and although with list line tracker, it recomputes the whole lines each time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great for me. I really noticed the difference on a 100,000 line file.
Before auto closing tags wouldn't work, but its really fast now.
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocument.java
Outdated
Show resolved
Hide resolved
Fix #426 Signed-off-by: azerr <[email protected]>
828b11d
to
fd482ea
Compare
Thanks @NikolasKomonen for your feedback! @fbricon anything else? It should be very cool if this PR could be merged this night. |
Signed-off-by: Fred Bricon <[email protected]>
I've pushed a small change to adjust the logging level with -Dlog.level in the server VM args, to minimize polluting the logs. |
Thanks guys for your review |
Fix #426
Signed-off-by: azerr [email protected]