-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Loading of Works page is painfully slow #844
Comments
Some highlights from a brief analysis of the works page for Phaedo (124 editions) which renders in about 20 seconds.
Basically all the time is being spent waiting for API calls, but it's impossible to tell what those calls are from this view. The high do_handshake ncalls may indicate that SSL connections aren't being reused.
Unsurprisingly, fetching the data for each edition seems to be taking the bulk of the time, although a) 2 seconds per edition seems very high and b) there's a hint that perhaps it's entirely the fault of checking for loan status/availability. |
@tfmorris reports:
|
Oops, this ended up as a comment on the gist instead of here:
|
Just spitballing: if the availability is removed from the works page, might there be a way to prefetch it, so that when the user hovers on a "borrow" the status can be shown promptly? |
Can the edition list be changed to a pager? Not only are works pages slow to load, they are also slow to navigate; if you want to go to the last page of a long list you could end up scrolling through hundreds of editions. |
We'll still have availability... it will just be fetched in 1 go (as a batch), rather than checking availability for many books individually. There are additional optimizations we can add to improve navigation (cc: @seabelis); I prefer if we address this as / create an independent issue :) |
Related to the goal of merging works & edition pages (#684), the current works page is too slow to be viable as a basis for the primary book page with page render times of over 20 seconds once a work has more than 100 editions (e.g. Plato's Phaedo)and regular timeouts for works like Plato's Republic which have a few hundred editions.
A core problem seems to be that all information for all editions is loaded up front even though the UI is paginated and the sure only sees a few editions at a time. This is a waste of time which doesn't benefit the user.
The fact that subsequent page loads aren't any faster would also indicate that caching is ineffective/broken.
The text was updated successfully, but these errors were encountered: