git-annex/doc/todo/move_readonly_values_to_AnnexRead.mdwn
Joey Hess 014dc63a55
avoid sometimes expensive operations when annex.supportunlocked = false
This will mostly just avoid a DB lookup, so things get marginally
faster. But in cases where there are many files using the same key, it
can be a more significant speedup.

Added overhead is one MVar lookup per call, which should be small
enough, since this happens after transferring or ingesting a file,
which is always a lot more work than that. It would be nice, though,
to move getGitConfig to AnnexRead, which there is an open todo about.
2021-06-14 12:40:41 -04:00

12 lines
686 B
Markdown

AnnexRead has recently been split out of AnnexState,
and reading values from it is faster (no MVar). So,
anything that never needs to be modified while git-annex is running can be
moved to AnnexRead for a performance win and also to make clean how it's
used. --[[Joey]]
The easy things have been moved now, but some things like Annex.force and
Annex.fast and Annex.getGitConfig would be good to move. Moving those would
involve running argument processing outside the Annex monad. The main
reason argument processing runs in the Annex monad is to set those values,
but there may be other reasons too, so this will be a large set of changes
that need to all happen together. --[[Joey]]