kotlin-toolkit
kotlin-toolkit copied to clipboard
EPUB navigator crashes or hangs with really large resources
What happened?
The EPUB Code du travail.epub contains very large resources (30k+ lines). When opening it with the Test App, loading these resources takes around 20s and sometimes crashes the app which runs out of memory.
Once opened, turning pages can take ~0.5s, with much of the work done in the web view painting step:
Expected behavior
Slowness in paginating mode is to be expected with such large resources. However, it should be laid out much faster.
Lead
There's a bottle neck in the embedded HTTP server. A simple GET request for such resource takes more than 10s outside of the navigator. We want to remove the HTTP server so this issue might eventually fix itself.
Additional context
Bug initially reported by @llemeurfr on Slack: https://readium.slack.com/archives/C703MSTQU/p1644429978110749
Performances are also bad on Thorium, but alright on iOS.
Any news on this bug yet? Because I'm experiencing the same issue with even longer than 0.5s when turning pages.
Not yet but I'll expect we'll work on removing the HTTP server this year. No ETA though.
The HTTP server has been removed and, unfortunately, resource loading is still very slow.