esy-issues icon indicating copy to clipboard operation
esy-issues copied to clipboard

Faster `esy` env for global installs.

Open jordwalke opened this issue 8 years ago • 4 comments

I'm making global packages for things like refmt, and they expose wrapper scripts that simply defer to esy refmt. That's great, but that seems to be incurring an additional 50ms each invocation at least. For local project development that is wonderfully fast! Part of that time goes into checking if any package.jsons were modified and it's worth it. However, for global packages, nothing ever changes, so I think wrapper scripts could benefit from an esy-cached command version.

cc @sanderspies

jordwalke avatar Feb 10 '17 00:02 jordwalke

This is a good first task.

jordwalke avatar Feb 10 '17 00:02 jordwalke

Local project development invokes this every build right? No-op bsb is 70ms. Adding 50ms for esy refmt during parsing is unfortunate.

chenglou avatar Feb 10 '17 00:02 chenglou

@chenglou no, not every build. It's just to load the environment. So for example, you would spin up your bsb build server using esy bsb -make-world -w, and only pay the first time you load the env. You could also do esy shell then do bsb -make-world -w and it would only incur the cost when you do esy shell. But I would like it to be instant the second time you do esyf anycommand - and it should be very straightforward. This task is simply a matter of not checking if any package.jsons changed (currently it checks) when you run esyf command. ("esy fast").

jordwalke avatar Feb 10 '17 08:02 jordwalke

Right, a build watcher circumvents this. I was asking about straight up bsb -make-world, no -w. Your issue makes sense.

chenglou avatar Feb 10 '17 08:02 chenglou