mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
ProgressTracker was only freeing memory for work items when they reach the head of the work tracking queue. If the first work item takes hours to complete, and thousands of items are processed every second, this leads to millions of completed items tracked in memory at a time, wasting gigabytes of system RAM. Rewrite ProgressHolderState methods to keep only incomplete work items in memory, regardless of the order in which they are added or removed. Also fix the unit tests which were relying on the memory leak to work, and add test cases for code coverage. Signed-off-by: Zygo Blaxell <bees@furryterror.org>