info: Added calculation of combined annex size of all repositories
authorJoey Hess <joeyh@joeyh.name>
Wed, 8 Nov 2023 17:15:00 +0000 (13:15 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 8 Nov 2023 17:35:11 +0000 (13:35 -0400)
commit11cc9f19339b5fa80f238e42407eb9ed87cf8855
tree546995f32e7bd1c9ad2aa15c57e9285ed43b1d5e
parent8768966d973d47af48aaa7077120e053ead8d0bd
info: Added calculation of combined annex size of all repositories

Factored out overLocationLogs from CmdLine.Seek, which can calculate this
pretty fast even in a large repo. In my big repo, the time to run git-annex
info went up from 1.33s to 8.5s.

Note that the "backend usage" stats are for annexed files in the working
tree only, not all annexed files. This new data source would let that be
changed, but that would be a confusing behavior change. And I cannot
retitle it either, out of fear something uses the current title (eg parsing
the json).

Also note that, while time says "402108maxresident" in my big repo now,
up from "54092maxresident", top shows the RES constant at 64mb, and it
was 48mb before. So I don't think there is a memory leak. I tried using
deepseq to force full evaluation of addKeyCopies and memory use didn't
change, which also says no memory leak. And indeed, not even calling
addKeyCopies resulted in the same memory use. Probably the increased memory
usage is buffering the stream of data from git in overLocationLogs.

Sponsored-by: Brett Eisenberg on Patreon
CHANGELOG
CmdLine/Seek.hs
Command/Info.hs
Logs/Location.hs
doc/git-annex-info.mdwn