Skip to content

[BUG]: Resume analyzer can be very slow due to N+1 DB queries per missing skill #252

Closed

Description

@Aditya8369

Issue Details

Where: backend/controllers/resumeAnalyzer.controller.js
Problem: For each missing skill, it runs Course.find(...) separately (up to 8 skills). This is up to 8 sequential queries.
Impact: Latency spikes; timeouts under load.
Fix steps
Replace per-skill loop with a single query using $or of regexes for all missing skills (or use $in with normalized tokens where possible).
Post-process returned courses by best matching skill.
Add a hard cap on missingTop (already slice(0,8), keep it).

Activity

  1. Aditya8369 commented on Jun 1, 2026

    @Aditya8369
    ContributorAuthor

    @omkarhole please assign me this

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

Metadata

Metadata

Assignees

Labels

NSOC'26Issues for the NSOC 2026 programblankUncategorized issue template

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions