perf(oss): reduce conversion allocations [IDE-1940]#1255
perf(oss): reduce conversion allocations [IDE-1940]#1255bastiandoetsch merged 5 commits intomainfrom
Conversation
|
/describe |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
PR Description updated to latest commit (66becca) |
030b123 to
06b5c63
Compare
66becca to
cd6eb0c
Compare
cd6eb0c to
a477253
Compare
|
Addressed the OSS cache review finding:
Verification:
|
Build map[id][]index once per convertScanResultToIssues and pass same-ID indices into toIssue instead of scanning all Vulnerabilities per issue. Adds issue_test coverage for index grouping and same-id MatchingIssues parity; updates direct toIssue unit tests to pass nil indices.
Cache repeated OSS extended-message rendering for identical vulnerability rows and add focused coverage for the memoized behavior.
Checkpoint 16: memoize url.Parse per distinct URL string (sync.Map + shallow copy per consumer). Pre-size reference slices in toReferences and extractReferences. Route CreateIssueURL and unified createIssueURL through the cache. Tests: url_parse_cache_test for cache semantics and CreateIssueURL.
Cap OSS extended-message and URL parse memoization so repeated unique scan data cannot grow package-level caches without limit in long-lived language-server sessions.
a477253 to
29307b0
Compare
This comment has been minimized.
This comment has been minimized.
PR Reviewer Guide 🔍
|
acke
left a comment
There was a problem hiding this comment.
oss_integration_test is failing
User description
Description
Reduces OSS conversion allocation pressure by indexing matching vulnerabilities, memoizing repeated extended messages, caching parsed URLs, and pre-sizing reference slices.
This is split PR 4 from
performance/IDE-1940_optimize-memory-footprint. It is temporarily stacked on PR #1250 so the pre-push/test-hook stabilizers from the fixture harness PR are present; after PR #1250 lands this PR can be retargeted tomain.Split Context
Scope
Verification
go test -count=1 -v ./infrastructure/oss(build/pr4_focused_oss_tests.log)make lint(build/pr4_make_lint.log)lint-fixand unit tests passed duringgit push --set-upstream origin perf/IDE-1940-oss-conversion-cachesChecklist
make generate)make lint-fix)PR Type
Enhancement
Description
Index OSS vulnerabilities by ID for faster matching.
Memoize extended message rendering for performance.
Cache parsed URLs to reduce overhead.
File Walkthrough
4 files
Index vulnerabilities by ID for efficient matching.Implement memoization for extended messages and URL parsing.Integrate URL parsing cache for references and issue URLs.Introduce URL parsing cache mechanism.4 files
Add tests for vulnerability ID indexing and matching.Adjust tests for toIssue and URL creation.Test memoization of extended message generation.Test URL parsing cache functionality.