commercialhaskell / commercialhaskell/stack

`stack path` is slower than usual

Open
#3,446 5 comments 0 reactions 0 assignees View on GitHub
type: enhancement type: performance
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### General summary/comments (optional)

Running `stack path --compiler-bin` prompts stack to start "Populating index cache" this is new behavior and didn't happen before. The issue for me is that I use this command in my shells login-script and it slows down initialization considerably.

My issue could be worked around if the stack installation maintained setting global environment variables.

I also do realize that this is perhaps not a standard use-case, however, I would like to have the programs that stack installs (`ghc` etc.) globally available and this is how I did this.

### Steps to reproduce

For example:

1. Log in to a new shell.
2. Run command `stack path --compiler-bin` or simply `stack path`.

### Expected

The path is printed immediately.

### Actual

It prints

"Populating index cache ...
Populated index cache."

### Stack version

```
$ stack --version
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1
```

### Method of installation

I believe I used the one-liner from this site https://docs.haskellstack.org/en/stable/install_and_upgrade/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.