optimisation
authorJoey Hess <joeyh@joeyh.name>
Wed, 4 Dec 2019 18:14:35 +0000 (14:14 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 4 Dec 2019 18:27:11 +0000 (14:27 -0400)
commit6535aea49a402b9ca08fc1070358374e5e0eb618
tree0b5c737f6cacc4e765a77a7d3477d3d27694c349
parentb88f89c1ef230419c8abe1957dde744354485ce3
optimisation

This was already optimised before, but profiling found that delEntry was
around 1.5% of the total runtime of git-annex whereis. It was being
called once per environment variable per file processed.

Fixed by better caching. Since withIndexFile is almost always run with
the same .git/annex/index file, it can cache the modified environment,
rather than re-modifying it each time called.
Annex.hs
Annex/GitOverlay.hs