microsoft / microsoft/component-detection
Change python detectors cache implementation
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 553
- Forks
- 135
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 6
Description
Currently, the Python client that the detectors use cache the whole response, which leads to OOM when the whl files are big.
First, I think the cache should be in the PythonResolver level and not in the client and cache Uri to HashSet of the dependencies.
Also, I think the cache should be changed to IMemoryCache instead of an actual MemoryCache instance.
AB#2098100
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating PythonResolver and the Python detector client, then trace where the full response is cached and inspect the cache type used there. Done means caching is owned by PythonResolver, stores each Uri to its dependency HashSet rather than the whole response, and uses IMemoryCache; verify behavior with the existing detector tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- performance, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100