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

performance improvements

Open letmejustputthishere opened this issue 2 years ago • 11 comments

currently with complex projects it takes a couple of seconds until the extension is up to date. e.g. when I type : Text to specify the type of a function argument, i can hover the text with my cursor and watch the progress of the tool with the info text updating like unbound type T unbound type Te unbound type Tex

letmejustputthishere avatar Feb 11 '23 19:02 letmejustputthishere

can this be improved? i autosave every 500ms (in case that has an effect)

letmejustputthishere avatar Feb 11 '23 19:02 letmejustputthishere

Does this still happen when autosave is turned off? This looks like a bug with the type checking debounce logic (rather than purely a performance issue), so it'll be helpful to know whether this is related to autosaving.

rvanasa avatar Feb 12 '23 05:02 rvanasa

I have this issue too and autosave is turned off, not sure if it could be caused by wsl2.

AleDema avatar Feb 18 '23 14:02 AleDema

turning off autosave didn't help :/ i'm on macos and use the latest version of the plugin

letmejustputthishere avatar Feb 23 '23 09:02 letmejustputthishere

Thanks for checking. Are there any public projects which I could use to fully recreate the issue on my end?

For some context, large projects with > 100 files used to take over a minute to fully type-check (comparable to large Rust projects in VS Code). Something on the order of 1-2 seconds is currently expected for projects with large numbers of files and dependencies. This can be further improved in the future, and hopefully the recent round of optimizations makes the extension a lot more usable for large projects in the immediate term.

rvanasa avatar Feb 23 '23 19:02 rvanasa

Yes, you can check this https://github.com/flowerpowerdao/power-equalizer

letmejustputthishere avatar Feb 24 '23 12:02 letmejustputthishere

Thanks! I will increase the priority of further optimizations (currently representing DFINITY at ETHDenver, so I'll most likely take another look at this after March 5). If anyone reading this is at the convention, definitely come say hi! :)

rvanasa avatar Feb 25 '23 03:02 rvanasa

Version 0.13.11 of the extension includes several bugfixes and improvements to address this issue. I'll leave this issue open for a bit; if you notice a difference (or lack thereof) in the smoothness of the type checker, definitely let me know so I can determine whether to prioritize another round of optimizations. :)

rvanasa avatar Aug 22 '23 01:08 rvanasa