kotlin-toolkit icon indicating copy to clipboard operation
kotlin-toolkit copied to clipboard

EPUB navigator crashes or hangs with really large resources

Open mickael-menu opened this issue 3 years ago • 3 comments

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:

Screenshot 2022-05-06 at 15 14 28

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.

mickael-menu avatar May 06 '22 13:05 mickael-menu

Any news on this bug yet? Because I'm experiencing the same issue with even longer than 0.5s when turning pages.

AlexManCode avatar Jun 22 '22 19:06 AlexManCode

Not yet but I'll expect we'll work on removing the HTTP server this year. No ETA though.

mickael-menu avatar Jun 23 '22 08:06 mickael-menu

The HTTP server has been removed and, unfortunately, resource loading is still very slow.

qnga avatar Mar 10 '23 09:03 qnga