Optimise resolver#1447
Conversation
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
| if err := cli.Execute(); err != nil { | ||
| log.Fatalf("error during command execution: %v", err) | ||
| } | ||
| f, err := os.Create("mem.pprof") |
There was a problem hiding this comment.
note: this should be removed.
Also there should already be memory profiling built into syft. If you use SYFT_DEV_PROFILE_MEM=true --that being said, it seems to have been inadvertently removed. I'll try and restore this functionality.
|
|
||
| go 1.18 | ||
|
|
||
| replace github.com/anchore/stereoscope => github.com/deepfence/stereoscope v0.0.0-20230111090613-ee0c9713629f |
There was a problem hiding this comment.
just a reminder for reviewers: this should be removed before merging (keep this comment unresolved for now)
Signed-off-by: gnmahanth <mahanth@deepfence.io>
f4df5a2 to
353d001
Compare
Signed-off-by: gnmahanth <mahanth@deepfence.io>
Signed-off-by: gnmahanth <mahanth@deepfence.io>
|
We don't want to remove files from the resolver index since we don't exhaustively know all possible calls about possible content. That is, we may use the configured globs to find packages but the contents of glob results may hint at other locations which we add as evidence on to the package. These new evidence paths aren't known in advance, so removing them from the index would break existing functionality. |
Fixes: #1446
Depends On PR: anchore/stereoscope#151
when dpkdb-cataloger is selected syft indexes whole filesystem even when cataloger is looking for files in
**/var/lib/dpkg/{status,status.d/**}, to fix this this PR adds path filter function which indexes files from paths required by catalogers when providedimprovements while scanning confluentinc/cp-kafka image when all catalogers are enabled
syft memory usage: ~350MB
syft memory usage with this PR: ~125MB
with only java catalogers enabled
syft memory usage: ~290MB
syft memory usage with this PR: ~80MB