-
Notifications
You must be signed in to change notification settings - Fork 38
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
Slow Start #23
Comments
Indeed, it takes about 25% of the startup time (1 second of my 3.7 second start time). I'll see what I can do about decreasing this. |
I'll bet You could maybe do that in the background, but converting the script to a binary module would be a bigger win from a performance perspective. It already makes heavy use of .Net and might benefit from using C# events instead of PowerShell events. |
@lzybkr: thank you for your help. I had some time to throw some It looks as though the I can't see any easy ways to decrease load time with breaking functionality. As you mentioned, moving the entire module to C# might help in load time. |
@kelleyma49 - Also - |
@lzybkr Ah, I understand now. Thanks for the clarification! |
In the latest version (https://www.powershellgallery.com/packages/PSFzf/1.1.22) I've moved the ReverseLineReader into a binary module. @Swoorup, give it a try to see if your startup times have decreased. |
Any updates on this issue? I'm using |
I think that for start we can get rid of the The
These changes saved me ~200 ms. |
For me, in PS7, it's literally half a second without this module vs 4 secs with it! I don't know what it means but "not declaring your exports in the manifest" would cause PS to read your entire code causing it to lag. Are you doing that already? |
[Update: after putting laptop to sleep and returning later, the startup time is 1.4-1.9 secs, which is comparable to PS6]
I'm finding the same on PS7 - 0.6 seconds without, 6 secs with. $error doesn't return anything. I'm using PSFzf v1.2.0 on Windows 10 1909. |
For me it takes 3.5s in Windows PowerShell and 3s in Posh7. |
Try this version to see if it's any faster: https://www.powershellgallery.com/packages/PSFzf/1.2.5-alpha |
Thanks for the new release. My PS 7 startup times were 1.4-1.9s when I posted on 9 April. I redid tests and was getting 1.5-1.6 after initial loads. With the new release (1.2.5-alpha), I'm getting about 1.41-1.51s. I'm using PS 7 in ConEmu. CMD and Windows Terminal are about 100ms faster. Note for installation: I had to use the
|
@Praful that's a bummer it's not more than that. However, I just made some more changes that shaved off a little more than 1/2 second in my test case (my load time went from ~1.6 seconds to ~1 second. You can get the latest Prerelease here to test it out: https://www.powershellgallery.com/packages/PSFzf/1.2.6-alpha. ⚠Note that this is a breaking change as PSFzf no longer automatically enables the aliases. You can enable all aliases using 1 of 2 methods:
Give it a try and let me know the results. I don't know what I can do beyond this, so I probably won't continue to work on this issue unless I'm fixing bugs. I'm always open to pull requests. |
@kelleyma49 Great news: 1.2.6-alpha has reduced startup time to a very respectable 550-650ms! Thank you. |
This is much faster for me in 2.0! My load time has gone from ~1.5s to 800-900ms. Great improvement, thank you @kelleyma49 |
I'll close this out as it looks like start time is acceptable. |
Adding this plugin hogs powershell start time.
The text was updated successfully, but these errors were encountered: