Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

Performance issues #55

Closed
Luncher91 opened this issue Oct 25, 2017 · 6 comments
Closed

Performance issues #55

Luncher91 opened this issue Oct 25, 2017 · 6 comments
Labels

Comments

@Luncher91
Copy link

Hey Patrys,

Thank your bringing such a great extension to vscode. I have developed a symbol parser for VBScript and during my tests I got some files with 25k lines of code or more which contained nearly 4000 symbols.

Your extension seems really chew on that many symbols. It is no show stopper because it appears only on very large files but maybe you know some parts of your code which can be optimized so it won't utilize that much of the CPU.

Thanks man!

Best regards,
Andreas

@patrys
Copy link
Owner

patrys commented Oct 25, 2017

It would be very interesting to understand what exactly causes it to be slow. Would it be possible for you to profile the tree building function with a symbol provider that reports such a large number of symbols?

@Luncher91
Copy link
Author

I tried to create a profile of your extension but I think I am doing it wrong.
To reproduce the lng loading time you have to use a file with some symbols:
longTestFile.zip

load my extension:
vbscript-language-server-client-0.0.7.zip

and set the following setting to get the output of the language server communication:
"vbsLanguageServer.trace.server": "messages",

Fire up your code outline and you should see what i mean. The language server responses just after 100 ms and vscode is loading quite some time until the code outline get displayed.

During my Profiling tests I observed a lot of "Update Layer Tree" actions but I am really not sure if that is coming from your extension or from visual studio code.

@patrys
Copy link
Owner

patrys commented Oct 25, 2017

Please see if 0.0.12 fixes this. I've reimplemented the tree builder from O(n**2) to ~O(n).

@patrys patrys added the bug label Oct 25, 2017
@Luncher91
Copy link
Author

Amazing! Thank you for the quick fix!

@patrys
Copy link
Owner

patrys commented Oct 25, 2017

No worries, the naive implementation stuck as I've never before encountered a file where it made such a difference 😄

@ScottEP
Copy link

ScottEP commented Oct 26, 2017

Talk about timing - I have a 100k-line JSON file that was killing VS Code yesterday because of this & your update has fixed it - thanks! 😄

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

No branches or pull requests

3 participants