Slow startup time
See original GitHub issueNVIMPluginController.init()
sometimes takes ~5s to finish execution on my computer (1.8 Ghz but still)
So I went along and measured how long each await
in NVIMPluginController.init()
takes in a very stupid way
export const logTime = (label: string) => {
console.log(label + " ");
console.timeLog("label");
};
public async init(): Promise<void> {
logTime("init");
let resolveInitPromise: () => void = () => {
/* ignore */
};
this.nvimInitPromise = new Promise(res => {
resolveInitPromise = res;
});
await this.client.setClientInfo("vscode-neovim", { major: 0, minor: 1, patch: 0 }, "embedder", {}, {});
logTime("setClientInfo");
const channel = await this.client.channelId;
logTime("channelId");
Output console of running vscode-neovim with the above logTime() calls - timings etc. (There’s lots of unnecessary output there, the format for the logTime() is:
functionName or whatever
label: [time in ms since start of activate() in extension.ts and end of execution of above function in line above]
but sometimes it outputs only the label: timeInMs
for some reason
So if you round up the above data, here are the timings of the init() awaits chronologically (I omitted some functions that were very fast):
await this.client.setClientInfo("vscode-neovim", { major: 0, minor: 1, patch: 0 }, "embedder", {}, {});
- 174msconst channel = await this.client.channelId
- 1301 ms Δ1100ms - this is from the node neovim client. Link to code in neovim node-client code snippetawait this.client.setVar("vscode_channel", channel);
- 1601ms Δ300msawait this.client.uiAttach(...)
2503ms Δ900ms Link to neovim node-clientconst firstWin = await this.client.window;
- 2865ms Δ350msawait this.client.callAtomic(winOptionsRequests)
- 3747ms Δ900ms(counts all calls in for loop cumulatively) await.thisBuffer(e)
- 4200ms Δ450msawait this.onChangedActiveEditor(vscode.window.activeTextEditor
- 5200ms Δ1000ms
The above was performed on commit 68f056b4c9cb6b2559baa917f8c02166abd86f11
(vscode-neovim v0.5)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
8 Ways to Fix Slow Boot Times in Windows 10 - MakeUseOf
8 Ways to Fix Slow Boot Times in Windows 10 · 1. Disable Fast Startup · 2. Adjust Paging File Settings · 3....
Read more >How to Fix Slow Startup on Windows 10 | SoftwareKeep
Uncheck the “Turn on fast startup (recommended)” option and click Save changes. You can try and restart your computer to see whether or...
Read more >Fix the Windows 10 Slow Boot Issue: 9 Easy Solutions
How can I fix a slow boot time in Windows 10? · 1. Use the Windows 10 Startup Manager · 2. Update your...
Read more >Full Guide to Fix Windows 10 Slow Boot After Update - EaseUS
Full Guide to Fix Windows 10 Slow Boot After Update ; Fix 1. Run Windows Defender to remove virus, If the virus infects...
Read more >Solved: Windows 10/11 Slow Boot [2022 Guide] - Driver Easy
How do I fix Windows 10 slow boot? · Disable Fast Startup · Disable Processes with High Startup Impact · Update your graphics...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m still coming in at 5s startup time. Worse than the startup time itself is that the UI is already usable while vscode-neovim is still starting up. So once it is ready it forces me into normal mode in moments I might already be typing.
https://user-images.githubusercontent.com/5774545/106643437-0644da80-658a-11eb-8231-fc96788c5411.mov
I gladly help with debugging this. I vote to reopen.
Since this issue is pretty old and a lot has changed since it was filed I’m going to close it.
As of now (vscode-neovim 0.0.74) I’m getting 2128ms activation time in
Debug: Startup Performance
CTRL+SHIFT+P option