Skip to content
4 changes: 4 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@
## 2026-07-13 - Array.from mapping optimization
**Learning:** Using `Array.from({ length: N }).map(...)` creates an intermediate array of `undefined` values which requires memory allocation and garbage collection, adding O(N) unnecessary overhead in frequently re-rendered UI components.
**Action:** Use `Array.from({ length: N }, (_, index) => ...)` to map elements directly during array creation, avoiding intermediate allocations.

## 2026-08-31 - Reject unmeasured Array.find micro-optimization
**Learning:** Replacing `Array.prototype.find()` over four static progress entries with a manual loop removes a theoretical closure allocation but has no demonstrated product-level benefit and makes the bounded lookup less readable.
**Action:** Keep idiomatic `Array.prototype.find()` for tiny bounded collections unless profiling or benchmark evidence shows a material latency or allocation problem; prefer measurable algorithmic improvements such as keyed caches for genuinely repeated large lookups.
Loading