Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Specifying the load order of extensions (reduce startup wait-time) #46846

Closed
haudan opened this issue Mar 28, 2018 · 15 comments
Closed
Labels
extension-activation Issues related to extension activation extensions Issues concerning extensions feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Milestone

Comments

@haudan
Copy link

haudan commented Mar 28, 2018

Allow the user to specify in what order installed extensions get loaded. This could reduce wait times quite a bit, or at least give the impression of a faster startup; by allowing small, essential extensions to get loaded first.

Users often install a lot of extensions, but in reality, only very few are really vital for the user's workflow. By allowing these "vital" extensions to be loaded first, the user has to wait less time before being able to work.

Proposal
The load order could be specified as an array, where extensions lower in the array (= with lower index) get loaded first:

"extensions.loadOrder": [
    "my_super_important_extension",
    "somewhat_important",
    "mildly_important",
    "whatever"
]

Extensions not mentioned in the list would get loaded after the last specified extension (after whatever).

@vscodebot vscodebot bot added the extensions Issues concerning extensions label Mar 28, 2018
@alexdima alexdima added the feature-request Request for new features or functionality label Mar 28, 2018
@alexdima alexdima added this to the Backlog milestone Mar 28, 2018
@alexdima alexdima removed their assignment Mar 28, 2018
@alexdima
Copy link
Member

Already today not all extensions are loaded on startup. Loaded extensions can be seen via F1 > Show Running Extensions

@sandy081 sandy081 removed their assignment Mar 28, 2018
@haudan
Copy link
Author

haudan commented Mar 29, 2018

@alexandrudima True, however I still think this feature would be useful. When I take a look at my loaded extensions during normal workload, there are two extensions with around 33 ms, a bunch around 500 ms and one > 2400 ms. The most important extension needs 366 ms. If I could make this important one load first, followed by the two very quick ones and then the rest, could speed up my workflow.

By the way, what's the difference between "Activation" and "Startup Activation"?

@alexdima
Copy link
Member

@Lisoph Can you create issues against the extensions with slow startup? It is somewhat crazy that an extension would take 2400ms to activate...

Startup Activation means that the extension got activated on VSCode startup (it uses * or workspaceContains: activation events).

The other got activated by you doing something. e.g. clicking an action, opening a certain file type, etc.

@haudan
Copy link
Author

haudan commented May 8, 2018

@alexandrudima good idea with raising an issue on the extension's GitHub, but I don't think this can apply to all extensions. I wouldn't necessarily consider slow startup a bug of an extension. Some extensions just need some time to load (for whatever reason).

Thanks for clarifying the activations!

@metjuperry
Copy link

I still think this would be really helpful. From experience, loading extentions such as Docker, Azure or Live Share takes priority over things such as XML and JSON formater, so I need to wait few seconds before i can format a document. I would like to put these extentions first because they take almost no time to load and I need them availible as soon as possible

@Cons-Cat
Copy link

I have installed a tab which replaces the empty workspace view of VS Code. Its startup activation is 12ms, but I have to wait two or three seconds from VS Code's startup to see it because it's a ways down the load queue. This is the only extension I want to have loaded almost instantly, so I second this feature request.

@hyprhare
Copy link

I'm finding visual conflicts with extensions that enhance the text editor visuals/experience and want to decide which extensions have priority over the others... I'm assuming being able to set the load-order (as well as the draw-order, supposing that could be different) would be a welcome addition to VS Code users.

@pikajude
Copy link

This feature would be useful for my workflow that uses both direnv and rust-analyzer. rust-analyzer needs to run after direnv has already loaded the environment, because otherwise it's not able to find the command line tools it needs. Currently this is fixable using the Rust Analyzer > Restart server action, but I vaguely remember using other language servers that don't support a restart action (or their restart action doesn't work properly).

@BstevensG4G
Copy link

BstevensG4G commented Apr 23, 2021

I believe this may be what is causing the Redwood repository reported issue
VS Code Extension wont load in remote - ssh mode. #1478
And because of the potential other issues that could arise and the ability for extension builders to debug problems with their extensions this should be something that isn't just a feature!

@NomarCub
Copy link

Isn't #57481 the same issue?

@haudan
Copy link
Author

haudan commented May 31, 2022

Isn't #57481 the same issue?

It appears it is. It was created 5 months after this one and mostly other people are commenting there. This yields > 60 upvotes (22 here, 43 there).

I don't think I'm a fan of their priority solution though. Shuffling around precedence scores could become unwieldly.

@jrieken jrieken added the extension-activation Issues related to extension activation label Oct 26, 2022
@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Dec 6, 2022
@vscodenpa
Copy link

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@peterwaller-arm
Copy link

Hi, please reconsider this one. See for example the issue above referencing this one: rust-lang/rust-analyzer#15852 and the number of thumbs down on the above triage bot comment.

Without being able to control the startup order, it seems it's not possible to influence the environment which is necessary so that later extensions see the environment configured by the earlier extensions.

cc @isidorn @alexdima

@L-i-o
Copy link

L-i-o commented Oct 4, 2024

In my setup Bookmarks extensions (alefragnani.Bookmarks, tintinweb.vscode-inline-bookmarks) conflict with Outline generation extensions (Oracle.sql-developer) when are activated before (the Outline panel remain empty).
I need to manually Disable and Enable the Bookmark extensions after all Outline extension are activated

@ackvf
Copy link

ackvf commented Nov 19, 2024

Lazy loading extensions

I don't really care about the order of extensions, but I would really love to be able to have a JS or Python related extension load only when first JS or Python file is opened, when a command is executed for the first time, or simply being able to defer loading of any extension n seconds after startup and then have them load with lowest priority so that the IDE doesn't hang.

In short, have the extension provide the API (e.g. commands, keyboard shortcuts), but load lazily only after a feature is used for the first time.

/edit added #234231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-activation Issues related to extension activation extensions Issues concerning extensions feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests