Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Bolt's Journal - Critical Performance Learnings

## 2025-05-18 - N+1 Webhook Storage Queries
**Learning:** Retrieving all entity records (such as webhooks) by first fetching all users (`storage.getAllUsers()`) and then looping over each user with `storage.getWebhooksByUserId(user.id)` creates an N+1 async call overhead (1 + N queries) and filters the full collection repeatedly. Adding a direct `getAllWebhooks()` method reduces this to O(W) with a single query call.
**Action:** Always provide direct collection-level getter methods on storage abstractions for bulk operations instead of composing user-by-user iteration loops.
Loading