[PERF] Time-to-pack Increases Proportional to File Count Rather than Backup Size #41
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
zadammac/Tapestry#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
The first two steps of the backup construction process (The "sorting" step and the actual "packing" step) scale in time-to-complete based strongly on the number of items included in the backup, with the overall file size playing a relatively small role in the time spent on these steps. The RIFF file size also scales virtually linearly based on file count alone with file size playing only the smallest influence on the RIFF output file's size.
To Reproduce
Steps to reproduce the behavior:
--incor unflagged backup against a data set containing 10s of the 1000s of files.Expected behavior
As much as possible the main constraint in Tapestry's run time should be the amount of data being backed up, rather than the individual number of small files. This is especially of concerned when used by users who generate a very large number of relatively small files; such users to include many FOSS advocates who doubtless have many locally cloned repos which may or may not be included in their backup paths.
Log/Console Output
Where possible, add the output of the Logs or Console when the problem occurs.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
This became especially evident when working with a backup tree that included the qmk source code. The qmk source code contained well over 50,000 individual files which collectively made up roughly 93% of all files included in the backup run. Simply tarring the directory containing the qmk source code and removing the unpacked version of the repo from the path of the backup reduced backup times from tens of hours to 24 minutes, without changing anything about Tapestry itself or the hardware it was run on. This only changed the final output file size for the .tap files by roughly the size of a compact disk; it did however reduce the RIFF file sizes by over 75%
This issue is fundamentally being caused by the tarbuild process evidenced in
windows_pack_blocksandunix_pack_blocks, and is reproducable on both systems.The solution to this issue long-term is a change to how blocks are packed, to have them work more like compression - one child process working on one block at a time.
However, this is a heavy lift for an issue with a known workaround, and one that only occurs in relatively extreme cases, which no user other than me has reportedly encountered.
Since there are no other known users of Tapestry, and I am satisfied with the workaround, and given the impending sunset of Tapestry as a tool used by Arcana Labs, I will not be taking action to address this issue.