perf: avoid reloading skill graph during recommendation scoring#1245
Merged
komalharshita merged 2 commits intoJul 18, 2026
Merged
Conversation
|
@DevChinmaysamal17 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
Looks good! This PR provides a clean performance optimization by loading the skill graph once per recommendation request instead of reloading it for every project evaluation. The change reduces unnecessary file I/O while preserving the existing recommendation logic and API behavior. The implementation is well-scoped, and the included test results indicate no regressions. I don't see any blocking issues. Approved for merge. ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the performance of the recommendation pipeline by avoiding repeated loading of the skill graph during project scoring.
Previously,
score_single_project()loadedskill_graph.jsonfor every project being evaluated, resulting in unnecessary filesystem I/O and repeated JSON parsing. This change loads the skill graph once inget_recommendations()and reuses the same instance throughout the recommendation process.Related Issue
N/A
Type of Change
What Was Changed
src/utils/recommender.pyscore_single_project()instead of reloading it for every project.How to Test This PR
Test Results
Notes for Reviewer
This change is intentionally limited to a performance optimization. It does not modify the recommendation algorithm or the API response. The only change is reusing a single loaded skill graph during a recommendation request to eliminate redundant file reads.