Skip to content

Conversation

@jdstrand
Copy link
Collaborator

No description provided.

@jdstrand jdstrand force-pushed the jdstrand/perf-fixes branch from 1e4d9a9 to c283f39 Compare January 28, 2026 19:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes unnecessary copy.deepcopy() calls and optimizes data structures by using sets instead of lists where appropriate. The changes improve performance and code clarity without altering functionality.

Changes:

  • Replaced copy.deepcopy() with shallow copies or direct references where deep copying was unnecessary
  • Converted list-based URL collection to use sets for automatic duplicate handling and improved performance
  • Simplified return values in collectGHAlertUrls to directly return sets instead of converting from lists

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cvelib/cve.py Removed unnecessary deepcopy of CVE packages list and CVE object; optimized collectGHAlertUrls to use sets instead of lists for URL tracking
cvelib/common.py Removed redundant deepcopy calls in readFile and readCve functions that were copying newly created objects

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jdstrand jdstrand merged commit 7e72f19 into main Jan 28, 2026
8 checks passed
@jdstrand jdstrand deleted the jdstrand/perf-fixes branch January 28, 2026 19:34
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.

2 participants