-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Open
Description
Description:
Thread search has two performance issues:
-
Double Debounce Delay (700ms): Search text is debounced for 400ms, then the options object is debounced again for 300ms, resulting in a 700ms total delay before API calls.
-
Layout Inconsistency: When switching between "All", "Following", and "Unread" filters, the loading spinner appears as a sibling element, causing the list container to resize and create a visible UI shake.
Steps to reproduce:
- Open Threads sidebar in any room
- Type in search box - observe ~700ms delay
- Switch filters rapidly (All → Following → Unread)
- Notice UI shake when loading spinner appears
Expected behavior:
- Search responds in 400ms after typing stops
- Filter switching is instant
- No UI shake or layout changes during filter transitions
Actual behavior:
Screen recordings attached showing both issues
- UI shake/jump visible when switching filters
WhatsApp.Video.2025-12-29.at.10.23.43.PM.mp4
and
- ~700ms delay before search results appear
Screencast.From.2025-12-30.00-44-55.mp4
Server Setup Information:
- Version of Rocket.Chat Server: 8.0 (tested on open.rocket.chat)
- Operating System: Fedora Linux 43
- Deployment Method: Rocket chat demo instance open.rocket.chat
Client Setup Information
- Desktop App or Browser Version: Brave
- Operating System: Fedora Linux 43
Additional context:
- similar components (
useDirectoryQuery,useQuery) also useuseDebouncedValue(useMemo(...))pattern - However, ThreadList is different: it debounces
textseparately (400ms) THEN debounces the options object (300ms) - Affects all thread search users
Relevant logs:
- Browser: No console errors. Network shows ~700ms delay.
- Server: No errors.
Note: I'm working on a fix for this issue and will submit a PR with the solution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels