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

Load meta entries for all chapters in one query to prevent N+1 queries #432

Conversation

martinek
Copy link
Contributor

This PR fixes issue where fetching chapters can take a long time for manga with a lot of chapters.

Instead of loading meta data from database for each chapter separately (doing N+1 queries), it now loads all the meta entries at once and sorts them out in memory.

@AriaMoradi AriaMoradi requested a review from Syer10 October 30, 2022 14:32
@AriaMoradi AriaMoradi merged commit a9e5bc0 into Suwayomi:master Oct 30, 2022
@martinek martinek deleted the fix/improve-meta-loading-in-getSourceChapters branch October 30, 2022 16:59
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

Successfully merging this pull request may close these issues.

3 participants