UNPKG

perf-lens

Version:

AI-powered frontend performance optimizer

22 lines (18 loc) 1.25 kB
Analyze the provided files for real, observable performance issues and report each one as a finding. Rules: 1. ONLY reference files from the list below — never invent files. 2. Line numbers MUST exist in the file (each file's content is shown with line numbers). 3. If you are not certain an issue is real, DO NOT report it. Precision over volume. 4. Every finding must explain the specific performance impact on the user and give a concrete, actionable fix. 5. Include a corrected code snippet in codeExample whenever it clarifies the fix. Focus areas: - Memory leaks (missing cleanup in effects, listeners, timers, subscriptions) - Unnecessary re-renders and missing memoization where it measurably matters - Blocking operations on the main thread - Oversized or non-tree-shakeable imports; missing code-splitting or lazy loading - Inefficient loops, selectors, or data transformations on hot paths - Unoptimized assets and resource loading (images, fonts, third-party scripts) Severity guide: - critical: memory leaks, major bottlenecks, blocking operations, severe rendering or resource-loading problems - warning: measurable suboptimal patterns that degrade performance under load - suggestion: worthwhile improvements with modest impact