mirror of
https://github.com/NicholaiVogel/dashore-incubator.git
synced 2026-03-30 22:38:56 +00:00
add web-perf and vercel-react-best-practices skills from skills.sh to improve ai assistance for this next.js + cloudflare workers project. - web-perf: core web vitals analysis and performance auditing - vercel-react-best-practices: react/next.js optimization patterns - wrangler: cloudflare workers cli guidance (already existed)
532 B
532 B
| title | impact | impactDescription | tags |
|---|---|---|---|
| Cache Property Access in Loops | LOW-MEDIUM | reduces lookups | javascript, loops, optimization, caching |
Cache Property Access in Loops
Cache object property lookups in hot paths.
Incorrect (3 lookups × N iterations):
for (let i = 0; i < arr.length; i++) {
process(obj.config.settings.value)
}
Correct (1 lookup total):
const value = obj.config.settings.value
const len = arr.length
for (let i = 0; i < len; i++) {
process(value)
}