Open NamPNQ opened 2 months ago
I wanted to fill a new issue, but I found this one and decided to continue on performance complaints here.
So I waited until https://github.com/version-fox/vfox/pull/188 became available and tried it this morning. The first thing that I noticed is that when I press the 'enter' key, my command prompt is redrawn with some noticeable delay. It's very small but still noticeable.
I used fnm
before and did not notice any "big" delays with it.
is it something that can be looked into?
ps: latest macOS in 13th version, latest fish and latest kitty
I did a quick benchmark and here are the results.
Performance has decreased, I need to find out what case this issue.
So I waited until #188 became available and tried it this morning. The first thing that I noticed is that when I press the 'enter' key, my command prompt is redrawn with some noticeable delay. It's very small but still noticeable. I used
fnm
before and did not notice any "big" delays with it.
https://vfox.lhan.me/guides/configuration.html#legacy-version-file
As mentioned in docs, if this feature is turned on, it may cause refresh environment variables slightly slower
So I waited until #188 became available and tried it this morning. The first thing that I noticed is that when I press the 'enter' key, my command prompt is redrawn with some noticeable delay. It's very small but still noticeable. I used
fnm
before and did not notice any "big" delays with it.https://vfox.lhan.me/guides/configuration.html#legacy-version-file
As mentioned in docs, if this feature is turned on, it may cause refresh environment variables slightly slower
I understand that additional checks are not free. But I don't understand why handling a .tool-versions
file takes a really small amount of time and handling a .node-version
takes a way bigger amount of time. The difference is huge. If we compare those two files, 2nd one should be processed faster as it contains data on only one particular runtime.
Do you have any idea why we have such a big difference?
Also, I noticed that the config file gets really weird ACL. Why did it suddenly become executable?
vv@my-precious ~/.version-fox $ ls -l config.yaml
-rwxrwxrwx 1 vv staff 98 Apr 23 23:13 config.yaml
vv@my-precious ~/.version-fox $
EDIT: the whore redraw issue happens only in dirs with .node-version
(/.tool-versions
) files.
I understand that additional checks are not free. But I don't understand why handling a
.tool-versions
file takes a really small amount of time and handling a.node-version
takes a way bigger amount of time. The difference is huge. If we compare those two files, 2nd one should be processed faster as it contains data on only one particular runtime.Do you have any idea why we have such a big difference?
There are two factors:
$HOME/.version-fox/.legacy_filenames
file to view all filenames that need to be match. vfox-nodejs
plugin implements to parse .node-version
file.There is a strategy here. First, match the locally installed version. If it does not match, then match the remote version, that will call Available
hook, this involves network IO and will seriously affect the speed.
I think it may be caused by this.
Also, I noticed that the config file gets really weird ACL. Why did it suddenly become executable?
vv@my-precious ~/.version-fox $ ls -l config.yaml -rwxrwxrwx 1 vv staff 98 Apr 23 23:13 config.yaml vv@my-precious ~/.version-fox $
Because I was going to do some advance preparation for solving #51, but I did it wrong. This file should be readable and writable. : (
Follow your command to benchmark, you run![image](https://github.com/version-fox/vfox/assets/2740696/840a3a11-d673-4226-9460-95053f53abe9)
node -v
for vfox, and justnode
for asdfThe result is very difference when run the same
node -v
, in my machine, the asdf is fasterVersion 0.4.1
OS macOS