Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce debounce delay in settings search #2126

Merged
merged 2 commits into from
Jan 3, 2025
Merged

Conversation

christian-byrne
Copy link
Collaborator

@christian-byrne christian-byrne commented Jan 2, 2025

Similar to:

The default debounce delay is 300ms which is too long in the node search context. Our current fuse search generally takes ~30ms to search among ~8k nodes.

This PR reduces the delay to 100ms to make the search more responsive.

The settings search takes ~20ms (on i7-14700). Lowering the debounce delay increases responsiveness noticeably.

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested a review from a team as a code owner January 2, 2025 17:32
Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the debounce here can be reduced because of UI flashing. If you can find a better way to handle the flashing then reduce debounce should be fine.

search_flashing.mp4

@christian-byrne
Copy link
Collaborator Author

While search handler was processing all options would be toggled to enabled state, the flickering is fixed altogether by changing that. I don't know if it was intended behavior.

@christian-byrne
Copy link
Collaborator Author

christian-byrne commented Jan 2, 2025

 1 failed
    [chromium-2x] › menu.spec.ts:492:5 › Menu › Workflows sidebar › Can export same workflow with different locales 
  6 flaky
    [chromium-2x] › menu.spec.ts:891:5 › Queue sidebar › Gallery › displays gallery image after opening task preview 
    [chromium-2x] › menu.spec.ts:898:5 › Queue sidebar › Gallery › should maintain active gallery item when new tasks are added 
    [chromium-2x] › menu.spec.ts:933:9 › Queue sidebar › Gallery › Gallery navigation › can navigate gallery Right 
    [chromium-2x] › menu.spec.ts:933:9 › Queue sidebar › Gallery › Gallery navigation › can navigate gallery Left 
    [chromium-2x] › menu.spec.ts:933:9 › Queue sidebar › Gallery › Gallery navigation › can navigate gallery Right wrap 
    [chromium-2x] › menu.spec.ts:933:9 › Queue sidebar › Gallery › Gallery navigation › can navigate gallery Left wrap 

Failed tests result from #2125 (presumably). I can address it shortly.

@huchenlei huchenlei merged commit 2e7de47 into main Jan 3, 2025
9 of 10 checks passed
@huchenlei huchenlei deleted the setting-search-delay branch January 3, 2025 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants