Skip to content

Update setTimeout in the debounce - #550

Merged
Dananji merged 1 commit into
mainfrom
slow-search
Jul 5, 2024
Merged

Update setTimeout in the debounce#550
Dananji merged 1 commit into
mainfrom
slow-search

Conversation

@Dananji

@Dananji Dananji commented Jul 3, 2024

Copy link
Copy Markdown
Collaborator

Related issue: #540

I removed the 5 millisecond timeout in the setTimeout and now it runs with a zero delay. This enables the browser to schedule these requests without immediately executing them. And it helps to avoid any unnecessary UI updates for intermediate responses.

I checked time it takes for the Ramp to process the search response (UI to updates right after this).

And I did this test for multiple transcripts in different items and I was seeing numbers less than 50 milliseconds (0.05 seconds) each time.

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good as far as I can tell.

@Dananji
Dananji merged commit 89c47ed into main Jul 5, 2024
@Dananji
Dananji deleted the slow-search branch July 5, 2024 17: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