calibrateMtimeChangeDelay takes 25s to execute on Mac OS X with HFS+ system
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
```
Prelude Distribution.Compat.Time Data.Time>
do { t1 <- getCurrentTime;
r <- calibrateMtimeChangeDelay;
t2 <- getCurrentTime;
print (t2 `diffUTCTime` t1);
return r; }
24.609871s
(1006168,1000000)
```
HFS+ stores file modtime with 1 second resolution. Function is here: https://github.com/haskell/cabal/blob/e14da30b01ff65098cc7fb20c134323c863a85ff/Cabal/Distribution/Compat/Time.hs#L184
Contributor guide
Research direction
Start in Cabal/Distribution/Compat/Time.hs at calibrateMtimeChangeDelay and reproduce the reported timing on Mac OS X with HFS+. Read the surrounding implementation to understand how the one-second HFS+ modification-time resolution is handled. Done means the calibration no longer takes roughly 25 seconds while retaining correct timing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100