Skip to content

Commit cd64ceb

Browse files
Merge pull request #295 (resolved conflicts)
2 parents bf8acd8 + dd68387 commit cd64ceb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.jules/bolt.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@
7575
## 2024-06-29 - Flutter StreamBuilder Memoization
7676
**Learning:** In Flutter, using .fold() inside a StreamBuilder's builder method executes an O(N) operation and allocates a closure on every widget rebuild, even when the stream snapshot hasn't changed.
7777
**Action:** Use identical() to check if the stream data instance has changed, and only perform O(N) calculations (using a standard for-loop to avoid closures) when a new instance is received, caching the result otherwise.
78+
## 2024-05-18 - Avoid ListView.builder for small static lists
79+
**Learning:** For small, static lists (like a handful of categories), `ListView.builder` introduces unnecessary closure allocation and indexing overhead on every rebuild.
80+
**Action:** Use `SingleChildScrollView` with a `Row` and a collection `for` loop to inline the widget creation and avoid closure allocation.

0 commit comments

Comments
 (0)