gencer / SCSS-Everywhere

A Visual Studio Code extension that provides CSS class and ID atttribute completion with incremental build and usage explorer for the HTML class attribute based on the CSS/Template files in your workspace. Also supports React's className attribute.
https://marketplace.visualstudio.com/items?itemName=gencer.html-slim-scss-css-class-completion
MIT License
24 stars 9 forks source link

Extension appears to significantly impact VSCode startup time #39

Open willstocks opened 5 years ago

willstocks commented 5 years ago

Hello!

I noticed that my VSCode was launching relatively slowly recently. Upon investigating (F1 -> Startup Performance), it appears that this extension is impacting startup time by around 3s:

Extension Activation Stats

Extension Eager Load Code Call Activate Finish Activate Event
gencer.html-slim-scss-css-class-completion true 1273 2 3740 *

Is there anything I can do about this? Please let me know if there's any other info I can provide 😄

gencer commented 5 years ago

First of all, I am sorry for late reply. I get dozens of notifications everyday and i sometimes miss few issues.

Is this happening on every project you open VSCode or just on specific project?

gencer commented 5 years ago

@willstocks-tech I have published a minimized (via webpack) version. Please test against 1.5.20. It will be in marketplace soon.. It's published.

willstocks commented 5 years ago

Hi @gencer - apologies for a delayed response! Fully appreciate you must get tonnes of notifications!

I have just updated and checked "Startup Performance" again:

Extension Eager Load Code Call Activate Finish Activate Event
gencer.html-slim-scss-css-class-completion true 753 3 2967 *

Whatever you did appears to have had a noticeable impact of at least 0.5s load time improvement 😁

Thank you! :)

gencer commented 5 years ago

I have packed extension via webpack. This is first step. I will continue to evaluate all possible ways for decreasing startup time. For now. I will leave this issue stay open.

willstocks commented 5 years ago

Hi @gencer

It might be worth looking at making use of activation events as well, rather than loading the extension upfront? For instance (taken from VSCode docs):

"activationEvents": [
    "onLanguage:html",
    "onLanguage:javascript",
    "onLanguage:css",
    "onLanguage:scss"
]