Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue/load: cache which directories are missing in importPkg
This avoids repeated calls to os.Stat via fileSystem.isDir. It reduces the number of syscalls from $ strace -f -t -e trace=file cue fmt ./internal/ci |& grep '/home/mvdan/src' | wc -l 90 $ strace -f -t -e trace=file cue fmt ./... |& grep '/home/mvdan/src' | wc -l 5224 by about 3% and 20% respectively to $ strace -f -t -e trace=file cue fmt ./internal/ci |& grep '/home/mvdan/src' | wc -l 87 $ strace -f -t -e trace=file cue fmt ./... |& grep '/home/mvdan/src' | wc -l 4162 Updates #3155. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I51e09a0adf233788c5c92c62c20a743b7873e73e Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195415 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io>
- Loading branch information