AlgoLens
See the algorithms behind your code.
AlgoLens is a local-first VS Code extension that detects inefficient algorithms in JavaScript and TypeScript as you type, and shows you how to optimize them — with both beginner and expert explanations.
Install
From the VS Code marketplace, search for "AlgoLens" and install. The extension activates automatically when you open a .ts, .tsx, .js, or .jsx file.
What you get
- 15 curated rules across performance, data structures, complexity, and memory — each gated by ≥95% precision on positive and negative fixtures.
- Real-time analysis — typing never blocks. The scheduler debounces edits, cancels stale runs, and enforces a per-file time budget.
- Beginner and expert modes — every finding ships with a one-sentence explanation, a full reasoning, trade-offs, and when not to apply. Toggle from any hover.
- Persistent ignore / snooze / restore — suppressions are keyed on AST coordinates plus an evidence hash, so they survive whitespace and comment edits.
- Sidebar browser — see every finding for the workspace, including lower-confidence ones that don't surface inline.
- Local-first — no source, no paths, no repo names ever leave your machine. Telemetry is off by default.
Quick tour
| Surface |
Default |
What you see |
| Diagnostics |
warning / info squiggles |
High-confidence findings only, capped per file |
| Hover |
mouse over a squiggle |
Beginner explanation + link to switch to expert |
| Sidebar |
activity bar, AlgoLens icon |
All findings, grouped by file |
| Code actions |
right-click or quick-fix lightbulb |
Ignore this finding / rule in file / rule in workspace |
| Status bar |
bottom right |
$(pulse) AlgoLens: N for the active file |
Settings
Every setting lives under algolens.*. The defaults are tuned for low noise; medium-confidence rules stay in the sidebar.
algolens.surfacing.proactiveConfidenceThreshold (default 0.85) — confidence floor for diagnostics
algolens.surfacing.maxFindingsPerFile (default 5) — diagnostics cap per file
algolens.surfacing.disableProactive (default false) — kill switch for diagnostics; sidebar still shows everything
algolens.explanations.mode (default beginner) — beginner or expert
algolens.analysis.activeFileDebounceMs (default 200) — debounce after the last keystroke
algolens.analysis.perFileBudgetMs (default 80) — hard wall-clock budget per analysis run
algolens.analysis.maxFileSizeKb (default 500) — skip files larger than this
algolens.rules.disabled (default []) — rule IDs to disable entirely
algolens.rules.severityOverrides (default {}) — per-rule severity override
algolens.intelligence.acceptDetectionEditsWindow (default 5) — implicit-accept window
algolens.telemetry.enabled (default false) — opt-in only
Commands
All under the AlgoLens prefix:
AlgoLens: Toggle explanation mode (beginner/expert)
AlgoLens: Open findings sidebar
AlgoLens: Restore all ignored findings
AlgoLens: Show ignored findings
Per-finding ignore commands appear in the right-click menu and the quick-fix lightbulb.
Privacy
AlgoLens is local-first. The analysis engine is forbidden from importing any HTTP client — enforced by an ESLint gate that runs in CI. Telemetry is off by default and, even when enabled, the channel scrubs PII-shaped property keys (paths, source, repository names, usernames) before forwarding.
License
MIT © 2026 Muhammad Salman