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

Slow search on rosindex #176

Open
mortenfyhn opened this issue Aug 22, 2019 · 7 comments
Open

Slow search on rosindex #176

mortenfyhn opened this issue Aug 22, 2019 · 7 comments

Comments

@mortenfyhn
Copy link

I hope this is the right spot for this kind of feedback.

When I search on index.ros.org, it takes around ten seconds to get the search results. The old index simply listed everything on one page, so I could use my browser's search function, which is immediate. How about adding a "show all" button on the main index page to get that possibility back? The default can still be 50 elements per page.

@hidmic
Copy link

hidmic commented Aug 22, 2019

@mortenfyhn does it always take ~10s? Or just the first time it loads? Most of the time used to and should be spent pulling the lunr.js-based index, not searching. Ten seconds is way too much even for that anyways.

@mortenfyhn
Copy link
Author

Seems to be first time only, after that it takes roughly 2.5 s. I'm using a Latitude 7490 laptop on a 100 Mbps line, so that should be okay.

@hidmic
Copy link

hidmic commented Sep 13, 2019

Yeah, it's the time it takes to pull the lunr.js index. We can further split it in chunks, but I don't how much that'd improve things. @tfoote any ideas?

@tfoote
Copy link
Member

tfoote commented Sep 16, 2019

If anything I think more chunking will slow things down. It looks like we're actually spending more time waiting for chunks than downloading them, and they're pretty small at the moment. Can we parallelize the downloads? Or can we background load the chunks while the searchbox is on the screen or at least as soon as the user starts typing in the search box?

Here's the network timeline I see getting the index files. That's only about half the index files. The rest are even smaller and load sequentially quicker.
Screenshot from 2019-09-16 16-08-19

@tfoote
Copy link
Member

tfoote commented Sep 16, 2019

We could also try out requestIdleCallback to background load it.

@ros-discourse
Copy link

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/growing-issue-with-ros-documentation/36075/44

@mortenfyhn
Copy link
Author

I'll update:

First of all: This is faster now. I'm not sure if it's faster devices and internet connection or the website is faster or both.

Within a browser tab, it seems to cache perfectly so subsequent searches are very fast. If I open a new tab, I get the loading again. But the loading is much more reasonable than what I experienced back in 2019.

Might be worth checking on a more modest computer, and with a browser that's guaranteed to not already have stuff cached.

rosindex-speed.mp4

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

4 participants