feat: implement array-based tree for 68-76% memory reduction#527
feat: implement array-based tree for 68-76% memory reduction#527matthyx wants to merge 1 commit intoanchore:mainfrom
Conversation
Replace map-based tree structure with compact array implementation to dramatically reduce memory overhead for container image file trees. Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
|
Am I reading the results right that runtime is increased noticeably: I have had some ideas to improve the filetree and overall processing / memory usage in a number of ways, but haven't been able to focus on this yet. I do appreciate the focus here, but just want to emphasize that stereoscope is fundamental to all our tools, as you probably understand, so we just need to be very careful with any changes here. Have you run the full Syft test suite with this change? |
Can we use anchore/syft#4639 ? |
Replace map-based tree structure with compact array implementation to dramatically reduce memory overhead for container image file trees.
Real world test with
/usr/bin/time go run cmd/syft/main.go scan gitlab/gitlab-ee:latest -o syft-json=/dev/nullshows a significant memory reduction:to: