esy icon indicating copy to clipboard operation
esy copied to clipboard

The process depth tree is too depth

Open Et7f3 opened this issue 4 years ago • 2 comments

esy version: 0.6.11 Operating System: Windows

Issue: The process depth tree is too depth: image What I understand: first two is cmd.exe can't reduce. first esy.exe is the public binary that setup env and call the second esy.exe I don't understand why esyBuildPackage/EsyBash is another binary can't they be used as libs ? one bash is useful because we launch a shell script and second bash is because we don't use exec inside the script and we mount other process should be improved in other repo

Actual behavior:

N/A

Expected behavior: We should be able to have only esy.exe the wrapper and the binary, two bash instance and the command of build.

Additional steps to reproduce: build a project and see the process tree with https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

I already helped reduce size of tree https://github.com/esy/esy/commit/d400bcd781afda865469a639060d0c2e2b21cfcf and can help for these. I opened an issue to know if we used this structure to avoid some bug/issue.

Also does the mount has to be done each time ? can't it be at installation of esy ? (so we can get ride of the bash script and avoid one bash instance) ?

Et7f3 avatar Aug 28 '21 14:08 Et7f3

I don't understand why esyBuildPackage/EsyBash is another binary can't they be used as libs ?

esyBuildPackage is spawned as another exe for parallelism. There have been recommendations to embed it inside esy itself, we'd still have to spawn another instance of esy. EsyBash could be though of as a bash process on Windows.

ManasJayanth avatar Nov 24 '21 09:11 ManasJayanth

Esy use lwt so we can keep the parallelism if we create a task. For esyBash instead of calling a function we call a binary. This forbid to use full sh syntax && || for instance because we do a pseudo word splitting (just cut in space and ignore all quoting special symbol).

Et7f3 avatar Nov 24 '21 12:11 Et7f3