Conversation
📝 WalkthroughWalkthroughReplaced import and usage of Changes
Suggested reviewers
✨ Finishing touches
Comment |
🎭 Playwright Tests:
|
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/24/2026, 12:40:38 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 22.3 kB (baseline 22.3 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 949 kB (baseline 949 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 11 added / 11 removed Panels & Settings — 440 kB (baseline 440 kB) • 🟢 -8 BConfiguration panels, inspectors, and settings screens
Status: 12 added / 12 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.83 kB (baseline 2.83 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 33.7 kB (baseline 33.7 kB) • ⚪ 0 BReusable component library chunks
Status: 8 added / 8 removed Data & Services — 3.17 MB (baseline 3.17 MB) • 🔴 +1 BStores, services, APIs, and repositories
Status: 8 added / 8 removed Utilities & Hooks — 24 kB (baseline 24 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 10 added / 10 removed Vendor & Third-Party — 10.7 MB (baseline 10.7 MB) • 🔴 +327 BExternal libraries and shared vendor chunks
Status: 1 added / 1 removed Other — 6.42 MB (baseline 6.42 MB) • 🟢 -192 BBundles that do not match a named category
Status: 42 added / 42 removed |
| }) | ||
|
|
||
| const debouncedSearchQuery = refDebounced(searchQuery, 50) | ||
| const debouncedSearchQuery = refThrottled(searchQuery, 50) |
There was a problem hiding this comment.
Should I rename this? Yes.
Will I?
Only if asked.
There was a problem hiding this comment.
I'd want it left as is specifically to serve as a reminder that this is wrong and awful
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/composables/useTemplateFiltering.ts (1)
87-95: RenamedebouncedSearchQueryto reflect throttling.The variable name no longer matches its behavior after the switch to
refThrottled, which can cause confusion later.♻️ Proposed fix
- const debouncedSearchQuery = refThrottled(searchQuery, 50) + const throttledSearchQuery = refThrottled(searchQuery, 50) - const filteredBySearch = computed(() => { - if (!debouncedSearchQuery.value.trim()) { + const filteredBySearch = computed(() => { + if (!throttledSearchQuery.value.trim()) { return templatesArray.value } - const results = fuse.value.search(debouncedSearchQuery.value) + const results = fuse.value.search(throttledSearchQuery.value) return results.map((result) => result.item) })
AustinMroz
left a comment
There was a problem hiding this comment.
It's a massive improvement and I'm hitting approve just because it's a massive improvement.
In terms of "how search should work", I can confidently say it should not be like this. This is entirely at odds with my understanding of how performance should be done. That it does substantially improve performance leaves me perplexed.
Almost guaranteed unrelated: My computer OOM'd and killed the frontend browser tab while I was writing this review, seemingly suggesting 14GB in use by the tab. Will try to repro.
| }) | ||
|
|
||
| const debouncedSearchQuery = refDebounced(searchQuery, 50) | ||
| const debouncedSearchQuery = refThrottled(searchQuery, 50) |
There was a problem hiding this comment.
I'd want it left as is specifically to serve as a reminder that this is wrong and awful
## Summary ... ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8286-Templates-Search-speed-2f26d73d365081dab3d1cccd7878a1de) by [Unito](https://www.unito.io)
Backport of #8286 to `cloud/1.37` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8397-backport-cloud-1-37-Templates-Search-speed-2f76d73d3650810c96fdd00691f9b2f7) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
Summary
...
┆Issue is synchronized with this Notion page by Unito