3 subject="""comment 7"""
4 date="2021-10-05T23:00:18Z"
6 I tried converting Ref to use ShortByteString. Memory use did not improve
7 and the -hc profile is unchanged. So the pinned memory is not in refs.
9 Also tried converting Key to use ShortByteString. That was a win!
10 My 20 borg archive test case is down from 320 mb to 242 mb.
12 Looking at Command.SyncpullThirdPartyPopulated,
13 it calls listContents, which calls borg's listImportableContents,
14 and produces an `ImportableContents (ContentIdentifier, ByteSize)`
15 then that gets passed through importKeys to produce
16 an `ImportableContents (Either Sha Key)`. Probably
17 double memory is used while doing that conversion, unless
18 the GC manages to free the first one while it's traversed.
20 If borg's listImportableContents included a Key (which it does
21 produce already only to throw away!) that might
22 eliminate the big spike just before treeItemsToTree.