-
Notifications
You must be signed in to change notification settings - Fork 488
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
[Bug]: Performance of querying for Newest Authors on Homepage > 2mins for big E-Book Library #3525
Comments
Same as #3237, but for authors instead of series. It is the same sort of query causing the slowdown. The backend data model likely needs to be changed to fix this. Also discussed starting from #3259 (comment) |
Don't forget about the possible quickfix to just disable the query/feature or introduce a setting for that to the user. I would certainly appreciate this low-effort solution until there is time for the 'big' solution to change the data model. Right now the app is hardly usable to me whenever I (sometimes only by accident while browsing other libraries) touch the home screen of the books library |
We found that an index can solve this. If you want to resolve this before that release is ready you can run the following sql statement: create index bookAuthors_bookId ON bookAuthors(authorId); You'll probably want to remove that before migrating to 2.16.0 though to not have 2 indexes if we use a different name. If we use the same name it will be fine. |
awesome! Good job! |
Fixed in v2.16.0. |
If you update to v2.16.0 I'm curious how much the performance improves |
Newest Author is now Lightning fast although i upgraded to 55k books while waiting for the release:
There is still some sigificant load time for the filterdata which I did not notice before, not sure if this was that high before the update or if it went up now. On the other hand it does seem to be slow only the first time opening the homepage after I add some new books. Any consequential clicks on the homepage took only a few seconds overall to load. Not sure when exaclty it is slow and when it is quick, needs some further testing ond abservation i guess. |
@friral Would you be willing to share your database for investigation for the long |
What happened?
The Newest Author load time on the Homepage of is still (v2.15) very high for my 40K E-Book Library. Smaller libraries (1-2K audiobooks) are fine. The other similar 6 queries (see log) on the same page take only very few seconds or ms.
Tested on my desktop Firefox & the Android app with same results
What did you expect to happen?
Steps to reproduce the issue
Audiobookshelf version
v 2.15.0
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
Linux
If the issue is being seen in the UI, what browsers are you seeing the problem on?
None
Logs
Additional Notes
No response
The text was updated successfully, but these errors were encountered: