-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Search crashes my browser (on docs.sqlalchemy.org) #8562
Comments
For example, I searched "sql" on sqlalchemy project. And I got 4746 entries at once.
And it makes the page very huge with heavy loop. I guess this wastes CPU and RAM. I think it would be better to add a threshold to stop listing search-result. I believe nobody sees the 4000th item. |
Fixes a performance issue with massive lists like sphinx-doc#8562. jQuery.slideDown is pretty bad perf-wise since it thrashes layout multiple times. The 5ms animation is unnoticeable (it last less than an animation frame!) and just burns CPU cicles unnecessarily in all browsers. On Firefox this is specially bad because it hits a performance cliff with list items / CSS counters (https://bugzilla.mozilla.org/show_bug.cgi?id=1683910#c26 for all the gory details) where it causes tons of counter recalc. An alternative fix for the Firefox cliff would be to set overflow: hidden on the list item, but I think removing the animation is probably more sensible, given that as I said it's just burning CPU. Fixes sphinx-doc#8562
Fixes a performance issue with massive lists like sphinx-doc#8562. jQuery.slideDown is pretty bad perf-wise since it thrashes layout multiple times. The 5ms animation is unnoticeable (it last less than an animation frame!) and just burns CPU cycles unnecessarily in all browsers. On Firefox this is specially bad because it hits a performance cliff with list items / CSS counters (https://bugzilla.mozilla.org/show_bug.cgi?id=1683910#c26 for all the gory details) where it causes tons of counter recalc. An alternative fix for the Firefox cliff would be to set overflow: hidden on the list item, but I think removing the animation is probably more sensible, given that as I said it's just burning CPU. Fixes sphinx-doc#8562
When I use the search functionality on docs.sqlalchemy.org it typically starts displaying a huge number of results which in only a couple of seconds results in using GBs of RAM, which then results in my browser crashing when the system runs out of memory.
The documentation is created with Sphinx.
I guess an obvious solution would be to implement pagination, rather than loading unlimited amount of results in the page.
Firefox on Linux.
docs.sqlalchemy.org may be a special case here, as the documentation is so big it's pretty common to get a huge number of search results.
See also: sqlalchemy/sqlalchemy#5790
The text was updated successfully, but these errors were encountered: