cache annex index filename for 1.5% speedup to queries

This commit is contained in:
Joey Hess 2020-04-10 13:37:04 -04:00
parent 5e4423c058
commit 2caf579718
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
8 changed files with 64 additions and 36 deletions

View file

@ -412,9 +412,7 @@ withViewChanges addmeta removemeta = do
- Note that the file does not necessarily exist, or can contain
- info staged for an old view. -}
withViewIndex :: Annex a -> Annex a
withViewIndex a = do
f <- fromRepo gitAnnexViewIndex
withIndexFile f a
withViewIndex = withIndexFile ViewIndexFile . const
{- Generates a branch for a view, using the view index file
- to make a commit to the view branch. The view branch is not