Paperback-iOS / app

Repository to host app releases, issues, and feature requests for Paperback
https://paperback.moe/
661 stars 20 forks source link

[BUG] operations are very slow on mangas with lots of chapters #843

Open Gniiiii opened 2 months ago

Gniiiii commented 2 months ago

Preflight Checklist

What type of Apple device have you encountered the bug with?

iPad

Operating System Version

iPadOS 17.3

App Version

0.8.7-r12

Describe the Bug

I have some mangas with lots of chapters ( a few k). For these, it takes a long time to display the chapter list, to start reading a chapter or to transition from a chapter to the next. Additionally, it sometimes happens that chapters are not properly flagged as read and I also suspect that these manga stall the refresh process (but I haven’t how to investigate).

This is not a network related issue because I have the same symptoms in flight mode with preloaded chapter. At these times, my iPad grows quite hot, indicating heavy workload. I tried repairing my database in case but that didn’t change the situation.

I do suspect an indexing strategy with a complexity that does scales well with high number of chapters

Steps to Reproduce

Find a manga with a lot of chapters (you may need to use a 3rd party source for that…) Bookmark it Open the bookmark to display the chapter list Open a chapter (you can download it first to ensure it’s not affected by network conditions)

Anything Else?

I noticed an old, closed issue from 2020 (#6) that also involve manga with a lot of chapters but involved an action with the last page of the chapter. This may have some connection

update: this seem to be the same issue as #815, which I missed in my initial search. They should be merged but I am not sure about how it should be done and I think I provided additional information worth keeping.

Gniiiii commented 2 months ago

Complementary info: once such big manga is opened, side effects are propagated, sometimes to other manga until the application is forced close and reopened