fastDebug Annex.Branch reads and writes
Reads of cached data are not debugged, only cache misses are, and since many commands pre-cache location log data, this avoids a slew of fastDebug calls when running commands such as git-annex get --from
This commit is contained in:
parent
2e9d4ac754
commit
bdba2c5914
1 changed files with 4 additions and 1 deletions
|
@ -264,7 +264,9 @@ get file = getCache file >>= \case
|
||||||
- (Changing the value this returns, and then merging is always the
|
- (Changing the value this returns, and then merging is always the
|
||||||
- same as using get, and then changing its value.) -}
|
- same as using get, and then changing its value.) -}
|
||||||
getLocal :: RawFilePath -> Annex L.ByteString
|
getLocal :: RawFilePath -> Annex L.ByteString
|
||||||
getLocal file = go =<< getJournalFileStale file
|
getLocal file = do
|
||||||
|
fastDebug "Annex.Branch" ("read " ++ fromRawFilePath file)
|
||||||
|
go =<< getJournalFileStale file
|
||||||
where
|
where
|
||||||
go (Just journalcontent) = return journalcontent
|
go (Just journalcontent) = return journalcontent
|
||||||
go Nothing = getRef fullname file
|
go Nothing = getRef fullname file
|
||||||
|
@ -312,6 +314,7 @@ set :: Journalable content => JournalLocked -> RawFilePath -> content -> Annex (
|
||||||
set jl f c = do
|
set jl f c = do
|
||||||
journalChanged
|
journalChanged
|
||||||
setJournalFile jl f c
|
setJournalFile jl f c
|
||||||
|
fastDebug "Annex.Branch" ("set " ++ fromRawFilePath f)
|
||||||
-- Could cache the new content, but it would involve
|
-- Could cache the new content, but it would involve
|
||||||
-- evaluating a Journalable Builder twice, which is not very
|
-- evaluating a Journalable Builder twice, which is not very
|
||||||
-- efficient. Instead, assume that it's not common to need to read
|
-- efficient. Instead, assume that it's not common to need to read
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue