-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
proto
causes starship
terminal script to execute slowly
#229
Comments
Does the If it was an initial run, there's always a small hit where we have to download the WASM code. |
The more than 600 milliseconds here refers to the time lost by starship to query the nodejs version used by the current project. When using the nodejs version managed by n, starship takes very little time. I can provide the steps to reproduce for reference. |
Reproduction steps:
|
proto detects the version dynamically at runtime, it's not fixed like other version managers. There's going to be some kind of hit, but I won't know where the slowdown is happening without the logs. |
|
Thanks, will look into. |
this doesn't work for me |
I'll have some improvements for this in the next version. |
A few changes in this PR should help with this: #238 |
Release v0.20 with these perf improvements. It'll probably only net like 100ms worth though. However, this version now supports symlinks alongside shims, so you can use those instead of the shims for the native speed. More info: https://moonrepo.dev/blog/proto-v0.20 |
@Mehdi-Hp Is it that long on every run? When not hitting the cache, we make some http calls, so that would explain the slowdown. But that shouldn't happen every run. You can also not use the shims, and just use the binaries directly. https://moonrepo.dev/docs/proto#how-does-it-work |
@milesj |
Can you paste the |
Umm, I'm lost. What's the full command here? |
@Mehdi-Hp Sorry that can be passed to any |
This should help even more: #274 |
@milesj
|
@milesj I run it again and got 1296ms for nodejs. I think this is my bottleneck: |
Yah agreed. This should go away for the most part in that PR I posted. |
I can say that version |
Nice! I'll keep working on getting that lower. Aiming for 100ms give or take. |
Close to under 100ms, nice. I just want to add my output in any case it helps pushing it further down. Also added "time" command. Seems that the HTTP client cost a lot:
|
Yeah I've been looking into the http client stuff, but it's a 3rd party lib (reqwest -> hyper -> rustls). I think the slowdown is loading http certs, but I'm not positive yet. The client is also only loaded when we need make requests, so for most calls it shouldn't be a perf hit. |
When I use proto to manage nodejs, the execution time of starship's script to query the nodejs version becomes extremely slow.
As shown in the picture:
The text was updated successfully, but these errors were encountered: