Skip to content

Conversation

gheyderov
Copy link

What’s in this PR

  • Lazy CVE DB: Initialize CVEDB only when binary checkers are used (language-only scans don’t create a DB).
  • Language short-circuit: If the filename is a known language fixture (e.g., pom.xml, package-lock.json, PKG-INFO), skip the expensive file-type subprocess checks and call parse(...) directly.
  • Smaller fixtures: Shrink test/language_data/fail_pom.xml and fail-package-lock.json to minimal valid samples; behaviour unchanged (these are none_found tests).

Before vs After (on my machine)

  • test_language_package_none_found (fail_pom.xml): 0.18s → 0.13s

Notes

@gheyderov
Copy link
Author

Hi 👋, this PR is part of Hacktoberfest.
If it looks good, could you please add the hacktoberfest-accepted label or review it? 🙏
Thanks!

@terriko
Copy link
Contributor

terriko commented Oct 13, 2025

I don't think this PR actually does what your comment above says, but it looks harmless so I've set the tests to run anyhow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: improve performance on our slowest tests

2 participants