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

Transcript search responses load slowly #540

Closed
elynema opened this issue Jun 28, 2024 · 3 comments
Closed

Transcript search responses load slowly #540

elynema opened this issue Jun 28, 2024 · 3 comments
Assignees

Comments

@elynema
Copy link

elynema commented Jun 28, 2024

Description

With the most recent Ramp build (I think), we are seeing much slower loading of content search responses into Ramp's transcript component. In the video here, I searched for the word 'isaac' in a transcript, and you can see a noticeable delay before any results are returned, and then a series of different hit counts as searches for each letter submitted as I type are returned.

I am seeing this in both avalon-dev and on the Ramp demo site. I have seen the delay in both Chrome and Safari on desktop and also in Safari on iPad. On Android and iPhone, it seemed to behave a bit better in that it doesn't seem to return the interim results, you just have to wait a couple of seconds to get results.

Here is an example record: https://avalon-dev.dlib.indiana.edu/media_objects/gf06g267d. I've been testing by typing 'isaac' in the transcript search box for the first record.

Is there any way to speed this up, or do we need to reduce how often we send searches as the user types?

Private Zenhub Video

@elynema
Copy link
Author

elynema commented Jul 2, 2024

Dananji is going to make another pass on this to improve further today.

@Dananji
Copy link
Collaborator

Dananji commented Jul 3, 2024

In the latest PR, I removed the 5 millisecond delay in the setTimeout and now it runs without a 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 the time it takes for Ramp to process the search response (UI to updates right after this).
Time difference between when the API response goes into the processing function in Ramp and when the results are formatted and passed to UI (Transcript component).

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.

@elynema
Copy link
Author

elynema commented Jul 10, 2024

I checked in Chrome and Safari and on iOS and Android. I don't see the flickering of in between results, which is great. I still have to wait about .5 - 1.5 seconds before I see any results. Presumably this is a combination of the time for the content search to respond and for the results to be formatted. Per Dananji's response, it sounds like mostly time for the content search to respond.

This seems reasonable at least for first implementation, so closing this.

@elynema elynema closed this as completed Jul 10, 2024
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

No branches or pull requests

3 participants