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

Improve AST traversal speed for symbols #44

Open
jsynowiec opened this issue Sep 1, 2016 · 10 comments
Open

Improve AST traversal speed for symbols #44

jsynowiec opened this issue Sep 1, 2016 · 10 comments

Comments

@jsynowiec
Copy link

jsynowiec commented Sep 1, 2016

After the last update I've noticed that the symbol navigation is quite often rebuilding and it takes some time. I'm not sure if it was like this earlier, because now I'm using this feature a lot more.

apielements

vscode 1.4.0
apielements 0.3.0
blueprint with ~ 80 symbols

@XVincentX XVincentX added the bug label Sep 1, 2016
@XVincentX
Copy link
Owner

Hey,

I will try to investigate into but I think the main problem would be the increased number of symbols we have now given we're putting transitions into the game as well.

I'll try with a large blueprint (or if you're willing to share yours, it would be better) and try to understand what's going on there.

@jsynowiec
Copy link
Author

Unfortunately I can't share this particular specification due to legal agreements :(

@XVincentX
Copy link
Owner

I understand that. I'll look into with some large blueprint I'll try to find around and see what's going on here.

@XVincentX XVincentX added enhancement and removed bug labels Sep 2, 2016
@XVincentX
Copy link
Owner

@jsynowiec

I made some investigations and I didn't find any bug. I mean, if symbols are getting rebuilt, it's because they need to.

Fundamentally VSCode triggers the symbols rebuild when it detects that the document has been changed. The problem here is the tree traversing time, which might be time consuming.

I should probably start to track the AST traverse time as well try to cut useless traversals. I'll see what I can do.

@XVincentX XVincentX changed the title Symbol navigation is often rebuilding and takes long Improve AST traversal speed for symbols Sep 2, 2016
@jsynowiec
Copy link
Author

Thanks for the notice. I look forward to those improvements. I can do some beta-testing if you want.

@XVincentX
Copy link
Owner

That's going to be hard. I'll keep you posted

@XVincentX
Copy link
Owner

Note: evaluate sift

@XVincentX
Copy link
Owner

Note:
image

This is not helping traversing the three. Sourcemaps and descriptions location are predictable, so get rid of that ASAP.

@XVincentX XVincentX added this to the v0.5.0 milestone Sep 26, 2016
@XVincentX
Copy link
Owner

This is going to be put as part of effort to bring data structures into the extension.

@XVincentX XVincentX removed this from the v0.5.0 milestone Sep 29, 2016
@jsynowiec
Copy link
Author

I can confirm that the 0.5.0 update is performing noticeably better on the same set of symbols.

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

No branches or pull requests

2 participants