back out incorrect IO interleaving change
Fix regression in last release that crashes when using --all or running git-annex in a bare repository. May have also affected git-annex unused and git-annex info. Reversed the order of the (++) in Annex.Branch.files so --all will stream lazily still when there are not a bunch of uncommitted journal files. Added a todo to maybe improve this later. This commit was sponsored by Trenton Cronholm on Patreon.
This commit is contained in:
parent
348c6d56f9
commit
d1961e4498
6 changed files with 65 additions and 15 deletions
14
doc/todo/improve_memory_usage_of_--all.mdwn
Normal file
14
doc/todo/improve_memory_usage_of_--all.mdwn
Normal file
|
@ -0,0 +1,14 @@
|
|||
Using --all, or running in a bare repo, as well as
|
||||
`git annex unused` and `git annex info` all end up buffering the list of
|
||||
all keys that have uncommitted journalled changes in memory.
|
||||
This is due to Annex.Branch.files's call to getJournalledFilesStale which
|
||||
reads all the files in the directory into a buffer.
|
||||
|
||||
Note that the list of keys in the branch *does* stream in, so this
|
||||
is only really a problem when using annex.alwayscommit=false to build
|
||||
up big git-annex branch commits via the journal.
|
||||
|
||||
An attempt at making it stream via unsafeInterleaveIO failed miserably
|
||||
and that is not the right approach. This would be a good place to use
|
||||
ResourceT, but it might need some changes to the Annex monad to allow
|
||||
combining the two. --[[Joey]]
|
Loading…
Add table
Add a link
Reference in a new issue