Skip to content

fix(parsers): use unsaved_tags instead of tags= in Finding constructor#14626

Open
valentijnscholten wants to merge 3 commits intoDefectDojo:bugfixfrom
valentijnscholten:fix/parser-tags-performance
Open

fix(parsers): use unsaved_tags instead of tags= in Finding constructor#14626
valentijnscholten wants to merge 3 commits intoDefectDojo:bugfixfrom
valentijnscholten:fix/parser-tags-performance

Conversation

@valentijnscholten
Copy link
Copy Markdown
Member

@valentijnscholten valentijnscholten commented Apr 1, 2026

Summary

While working performance improvements I noticed the JFrog xray parser looked quite slow compared to other parsers.
Turns out that setting the tags field while constructing Finding models (in-memory) made it very slow.

The 14k findings report took anywhere between 60 and 90 second just to parse. By switching to unsaved_tags it's now ~9seconds. Some other parsers needed the same fix and are part of this PR.

  • Passing tags= directly to the Finding() constructor triggers expensive tagulous tag processing for every finding object created during parsing
  • Changed 5 affected parsers to use finding.unsaved_tags = tags after construction instead, which lets the import pipeline handle tags efficiently
  • Affected parsers: jfrog_xray_unified, dependency_check, cargo_audit, anchore_grype, threat_composer

Benchmark on JFrog Xray Unified with 14,219 findings: 99s → 7.97s (12x faster)

…r for performance

Passing tags= directly to the Finding() constructor triggers expensive
tagulous processing for every finding. Using finding.unsaved_tags instead
bypasses this overhead and lets the import pipeline handle tags efficiently.

Affected parsers: jfrog_xray_unified, dependency_check, cargo_audit,
anchore_grype, threat_composer.

Benchmark on 14,219 findings: 99s -> 7.97s (12x faster).
@github-actions github-actions bot added the parser label Apr 1, 2026
@valentijnscholten valentijnscholten added this to the 2.57.0 milestone Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant