-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stack exec is slow #2885
Comments
Are you using |
Also, please try with a newer version! Not sure, but I think some performance improvements for this happened since 1.2 |
+1, I have this problem as well.
|
I think you should all use the For example, #2896 shows that some useful fixes didn't make it into 1.3.2. |
@lwm,
It's about 35% faster after a stack clean, but a 0.75s overhead is still too much in my opinion. |
Is it possible to ensure that running a script for the second time, as described here happens instantly? |
It is reliable. Certainly more reliable than ever before with Stack. It just appears to be not as performant as you expect. I admit this 0.75 overhead is a nuisance but Stack has improved in the 1.3.X releases, as I mentioned above. Stack has few contributors and a mounting load of work to do. There are more pressing priorities (I imagine, I'm not a core dev, just passing by every now and again). If this is important to you @NorfairKing, please consider submitting a PR. |
@lwm, Sounds good. I will try to look into why this is so slow and report back here. |
Well, that effort halted quickly: #2917 |
I've been trying to profile stack to find what's slowing it down but I've run into some problems. I've built stack from source with The thing I'm trying to speed up is scripting, so I have my little script (
It looks like stack does not accept RTS flags in a script:
because when I just run that command:
It works.
Now, I'm not very familiar with profiling haskell, but I thought the |
From my |
Enabling nix is even slower. I just tried with Version 1.3.2 x86_64 but unfortunately observing no performance improvements. |
I'm having the exact same issue. I upgraded from Here is the beginning of a
As you can see, the slowness is almost entirely between the last two lines (the Does anyone know what stack is doing there? I am running this on a ~85k LOC Haskell project with about 18 local stack targets in |
@jdreaver Interesting! I cannot reproduce with the stack repo, I get 0.01 seconds between those steps. I've also tried with a large project with lots of local targets, and got a similar result. Could be all the git dependencies, but I don't think I've also took a brief look at the code and can't see anything obviously expensive happening. |
Thanks for taking a look @mgsloan! I tried to make a minimal repro with a I think either myself or a coworker will take a look over the next couple weeks. I'll let you know if we find anything. |
I am having the same issue on a fresh project.
Full verbose log: https://pastebin.com/eM8qZyQP |
Steps to reproduce
Outside of a stack project:
Inside a small stack project with the only dep being base
Any ideas to make this faster? Dev tools like hdevtools using stack to do their job consume very most of their time waiting for stack, which is unfortunate.
Expected
Faster startup time of stack
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: