vfox
vfox copied to clipboard
[Question] Is wrong command in your benchmark?
Follow your command to benchmark, you run node -v for vfox, and just node for asdf
The result is very difference when run the same node -v, in my machine, the asdf is faster
Version 0.4.1
OS macOS
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
fnmbefore 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
fnmbefore 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-versionsfile takes a really small amount of time and handling a.node-versiontakes 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:
- You can view
$HOME/.version-fox/.legacy_filenamesfile to view all filenames that need to be match. - We need to focus on how
vfox-nodejsplugin implements to parse.node-versionfile.
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.
https://github.com/version-fox/vfox-nodejs/blob/aa6dc5faeba6cd354e83966f66a88cd6feef2204/hooks/parse_legacy_file.lua#L34-L41
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. : (