codeui icon indicating copy to clipboard operation
codeui copied to clipboard

[Fix] Slow activation

Open usernamehw opened this issue 6 years ago • 9 comments

Activation time is almost the same as all of my installed extensions combined:

Screenshot (79)

usernamehw avatar Sep 26 '19 16:09 usernamehw

Developer: Show Running Extensions workbench.action.showRuntimeExtensions

usernamehw avatar Sep 26 '19 16:09 usernamehw

Thanks for raising this.

On one hand, there is some justification for it. Most extensions load a lot on the fly. CodeUI does near zero compared to the load when it initializes. All the lifting is in detecting settings and generating hundreds of colored svgs for every element of VS Code. There is a mid-way strategy that's popular, which is to avoid piling more compute into VS Code's launch, and instead waiting until the extension's pane is drawn (for example). CodeUI is the pane and on many setups it would be an ugly load when you toggle the view.

Other hand: I'm pretty subpar at TypeScript. I didn't even know JavaScript when I set out to make this extension. @usernamehw, you write nicer, cleaner TypeScript-- that struck me looking at your PRs for sure. I think I was pretty efficient in a strategic sense but I probably overuse and/or misuse language-specific loops and iteration mechanisms in the init. There might be a lot of room for speed gains, such that a good pass could make the above a total non-issue, I'm really not sure.

Just to piggyback on this Issue, in general @usernamehw if you'd like to take on more responsibility or have some cool milestones in mind that we can reach for, just say the word! If you have anything, you should take the reigns on the plan. My mind is not always in this project, and I find the extension to be great for my uses... but some good ol' dissatisfaction is the right stuff as far as I'm concerned. Better TypeScript is a plus too, but for me, the important thing is just that you think CodeUI is neat enough as a user that you want more for it. I'll be right back to it to help code/plan if you do, guaranteed. Funnest part, and a lot funner than giving it a new hat.

It's in a good, necessary spot just gaining users-- the incoming complaints/missing feature reports are what I'm after before next moves; but by all means, don't wait for them! Thanks again for supporting. Means a lot to me.

ryanraposo avatar Aug 05 '20 06:08 ryanraposo

@ryanraposo I'm still not convinced that extension is needed at startup. It should be activated onView instead of *.

usernamehw avatar Oct 23 '20 20:10 usernamehw

@ryanraposo I'm still not convinced that extension is needed at startup. It should be activated onView instead of *.

onView it is, then.

ryanraposo avatar Oct 24 '20 15:10 ryanraposo

@usernamehw my activation times since switching to onView (454ms). I still agree that deferring away from VS Code launch was the right move.

onview

ryanraposo avatar Oct 30 '20 18:10 ryanraposo

No change. ~200ms as it was.

Screenshot (365)

usernamehw avatar Oct 30 '20 19:10 usernamehw

Maybe it's slower while debugging the extension?

usernamehw avatar Oct 30 '20 20:10 usernamehw

@usernamehw could be!

ryanraposo avatar Oct 30 '20 22:10 ryanraposo