mise hook-env slow in pathetic deep directories #4327
Replies: 3 comments 4 replies
|
debug/trace might lend more insight. I am pretty sure what is happening is it's looking for all the combinations of different |
|
I'll note for the record that this behavior gets really bad if you are browsing a network-mounted filesystem, as the roundtrip seems to absolutely kill performance. A roundtrip of 5-10ms means that because We can validate that performance by using filter that down with: And I get the following info (rightmost column has the time taken for each stat call as a fraction of seconds, most taking ~12ms): While I'm here, I'll note that unfortunately, I cannot find any configuration where I can add these network filesystems to a list where mise should just not run at all, so with mise it becomes impossible to even browse a single network drive. The configuration I tried was Version and timing info from mise when I ran that strace: |
|
I retested this against the current There have been two relevant improvements since this was reported:
For example, users on slow network filesystems can configure a short cache window and/or limit full checks to directory changes: [settings]
hook_env.cache_ttl = "5s"
hook_env.chpwd_only = trueIf config discovery should be excluded under an entire mount, # .miserc.toml
ignored_config_paths = ["/mount"]On Unix it can alternatively be set with Based on the current timings and these built-in controls, the original deep-directory performance issue appears to be resolved. If anyone can still reproduce a substantial delay on a current release, especially on a particular network filesystem, an updated timing/trace would be helpful. AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable. |

Uh oh!
There was an error while loading. Please reload this page.
Doing a test with PATH_MAX limits I noticed that hook-env seems to be getting slower & slower the deeper the directory structure gets. Using the commands from https://darnassus.sceen.net/~hurd-web/faq/foo_max/ I didn't get very far. With a path "only" ~150 directories deep I get the following timings:
(Last line is from the zsh time feature)
Output of doctor in this directory:
All reactions