vscode-apielements icon indicating copy to clipboard operation
vscode-apielements copied to clipboard

Improve AST traversal speed for symbols

Open jsynowiec opened this issue 8 years ago • 10 comments

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

jsynowiec avatar Sep 01 '16 13:09 jsynowiec

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.

XVincentX avatar Sep 01 '16 16:09 XVincentX

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

jsynowiec avatar Sep 01 '16 17:09 jsynowiec

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 avatar Sep 01 '16 17:09 XVincentX

@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 avatar Sep 02 '16 15:09 XVincentX

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

jsynowiec avatar Sep 02 '16 18:09 jsynowiec

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

XVincentX avatar Sep 02 '16 18:09 XVincentX

Note: evaluate sift

XVincentX avatar Sep 02 '16 18:09 XVincentX

Note: image

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

XVincentX avatar Sep 18 '16 10:09 XVincentX

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

XVincentX avatar Sep 26 '16 16:09 XVincentX

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

jsynowiec avatar Oct 09 '16 17:10 jsynowiec