-
Notifications
You must be signed in to change notification settings - Fork 54
Determine where speed improvements can be made #32
Comments
@mockdeep if |
@mockdeep it sounds like both A goal I had with I'd prefer to track down why there are speed issues to begin with. It's possible that What I don't want to do is add this functionality to address your issue and not address the underlying speed issues. The additional functionality will just be more code to support & test and doesn't actually get at the root of this issue. Speed issues are always tough, and my suggestion would be for you to profile it a bit. This will mean digging in and adding profiling output to the code base and running your altered version, then reporting back on where the most time seems to be spent. |
@mockdeep, can we get system stats here including CPU speed & details on your hard drive? |
@wbyoung I'm running an |
@mockdeep sorry for the delay. I'd recommend just altering the code directly within |
I also find it is slow when use |
@xinshangshangxin any help you can provide tracking down the cause of this would be appreciated. |
For me, avn-nvm is slow when executing the |
Extremely slow here as well. Terminal sessions take 10 seconds to initialize with avn on. |
Same here, zprof shows that it takes 90% of the time spent loading my shell. |
I'm finding avn takes about 7s when I cd into a project folder. I put some echos in the shell script and console.log's in the javascript in to help trace the hold up. The bulk of the time seems to be in listing the versions, which I can confirm, if I do BUT if I execute I tried hardcoding 'list 5' in the nvmCommand call, but that didn't change execution time. I don't know enough about the nvm / avn architecture on how to avoid this. Here's the debug output, each level of * represents a new timer.
|
I traced my shell startup problem to the one mentioned here for nvm. Adding the --no-use flag halves my .bashrc startup time, but doesn't have a noticable impact on avn speed. |
@chrisjensen thanks for all the details. Personally, I'm using |
|
@NickTikhonov, the determination of a version matching is complex for various reasons. For instance, |
|
@NickTikhonov @ljharb we do an |
@wbyoung hmm - |
Thanks, @ljharb. @NickTikhonov a PR based on this would be welcome and likely address the issues you’re facing. |
For those still stuck with this waiting for a patch. I've found making this change on my system dramatically improves the speed of changing directories: Edit Change the function
|
Nice. Halved my |
It appears that
avn
is a bit slow to change versions withnvm
. Bothavn
and thenvm
switch are taking over one second on my system. Thenvm
speed issue can be tracked at nvm-sh/nvm#926.Updates above made by @wbyoung, original comment from @mockdeep:
The text was updated successfully, but these errors were encountered: