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

Continuous scrolling is very slow for some epub books #545

Closed
demeralde opened this issue Jul 30, 2020 · 9 comments
Closed

Continuous scrolling is very slow for some epub books #545

demeralde opened this issue Jul 30, 2020 · 9 comments
Labels
bug Something isn't working epub.js Related to Epub.js

Comments

@demeralde
Copy link

Describe the bug
Continuous scrolling is painfully slow for some epub books. I haven't noticed this in all books, it seems to depend on the size of the book.

To Reproduce
Steps to reproduce the behavior:

  1. Download and open The Mind Illuminated by Culadasa epub book (I can't provide a source for this unfortunately)
  2. Turn on continuous scrolling
  3. Scroll down the page, it will be very choppy and slow
  4. Try clicking on a section on the sidebar, it will take a very long time to load and jump to it

Expected behavior
Continuous scrolling should always be fluid and snappy, regardless of the size of the book.

Screenshots
This doesn't look or feel as choppy as it actually is because it's a gif:

Peek 2020-07-30 15-42

Version:

  • Foliate version: 2.4.2
  • OS/Distribution and version: Ubuntu 20.04 LTS
  • Desktop environment: Gnome 3.36.3
  • Installation method: apt
@demeralde demeralde added the bug Something isn't working label Jul 30, 2020
@archisman-panigrahi
Copy link
Contributor

It looks like continuous scrolling consumes a lot of CPU cycles.

@johnfactotum johnfactotum added the epub.js Related to Epub.js label Aug 28, 2020
@johnfactotum
Copy link
Owner

This is really an upstream Epub.js issue.

@demeralde
Copy link
Author

Update: I've noticed this same issue with other books. It's also happening with the "scrolled" setting. This is a pretty big issue for me as a user, it inhibits the reading experience.

@Dreomite
Copy link

Dreomite commented Sep 6, 2020

It was a problem half a year ago as well, when I started using Foliate.

The only related issue in epub.js repo I could find is futurepress/epub.js#714 which was closed 2 years ago. Should we ask to reopen it?

@demeralde
Copy link
Author

@Dreomite I'd say so. I'll make a comment.

@demeralde
Copy link
Author

@johnfactotum as seen in this thread: futurepress/epub.js#714

It looks like they're not going to fix this anytime soon, so we can't rely on them. However, there's a quick hotfix which can be used (mentioned in that thread). If the repo is forked, this can be used in the meantime until they fix it.

@johnfactotum
Copy link
Owner

If you're interested in working on this issue, Foliate currently uses Epub.js built from this fork: https://github.com/johnfactotum/epub.js. The workflow for now is basically running npm run build and manually copying dist/epub.js to Foliate's src/web/epub.js.

@demeralde
Copy link
Author

@johnfactotum thanks, I'll hopefully have some time to do that. If not, if anyone else is interested feel free to go ahead because I may be a while.

@johnfactotum
Copy link
Owner

I think this can be closed now. In scrolled mode, the new renderer only calculates current location after debouncing (see #861 (comment)), which fixes the problem.

The new renderer doesn't support continuous scrolling yet, but that's a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working epub.js Related to Epub.js
Projects
None yet
Development

No branches or pull requests

4 participants