You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .jules/bolt.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,3 +75,6 @@
75
75
## 2024-06-29 - Flutter StreamBuilder Memoization
76
76
**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.
77
77
**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