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

Review: Workbench contribution for a LifecyclePhase #38286

Closed
bpasero opened this issue Nov 14, 2017 · 5 comments
Closed

Review: Workbench contribution for a LifecyclePhase #38286

bpasero opened this issue Nov 14, 2017 · 5 comments
Assignees
Labels
perf-startup scm General SCM compound issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Nov 14, 2017

Refs: #38080

You are contributing a workbench contribution which so far was instantiated right on startup, even before any UI was rendered (during service creation). We added a new parameter to allow to specify when a workbench contribution should get instantiated:

  • LifecyclePhase.Starting: right on startup (earliest, this was the default before)
  • LifecyclePhase.Restoring: right before we start to restore views and editors
  • LifecyclePhase.Running: after we have restored views and editors
  • LifecyclePhase.RunningForABit: 3 seconds after we have restored views and editors

Please check your contribution and decide which phase it should be instantiated earliest. Generally we discourage any phase before LifecyclePhase.Running if your contribution is doing something heavy.

@bpasero bpasero added perf-startup scm General SCM compound issues labels Nov 14, 2017
@bpasero bpasero added this to the November 2017 milestone Nov 14, 2017
@joaomoreno
Copy link
Member

joaomoreno commented Nov 14, 2017

I feel you'd be better suited to do this for me @bpasero, since I'm not aware of the implications of this, while you are aware of everything scm contributes.

@bpasero
Copy link
Member Author

bpasero commented Nov 14, 2017

@joaomoreno well, when is the event fired that SCM repositories are added? Does it need the extension host to be ready?

@joaomoreno
Copy link
Member

SCM provider additions only come from extensions, so they strictly happen after extensions are up and running.

@bpasero
Copy link
Member Author

bpasero commented Nov 14, 2017

@joaomoreno in theory the extension host could win over the workbench, though that is rather unlikely. Are these events buffered, e.g. would they emit even if you register only after the extension host is already running?

@joaomoreno
Copy link
Member

I guess not, since they are not events.

But the extension calls registerSCMProvider, which goes through ExtHostSCM, through MainThreadSCM which can't be instantiated without the ISCMService. That scenario is only possible if ExtHostSCM exists without MainThreadSCM... and in that case, the buffering should happen at the ThreadService messaging layer, not at every consumer of the process.

@bpasero bpasero self-assigned this Nov 14, 2017
@bpasero bpasero closed this as completed Nov 14, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
perf-startup scm General SCM compound issues
Projects
None yet
Development

No branches or pull requests

2 participants