Skip to content

Performance Issue On New Content Load #6

@mcmah309

Description

@mcmah309

When going through the examples, I noticed scrolled-continuous is very slow:

https://intity.github.io/epub-js/examples/scrolled-continuous.html

Lets say a user is trying to quickly scroll through to find a page or preview a reading, currently scrolling is not seamless. It keeps catching at the bottom waiting for new content to load in. Ideally it should never catch given the maximum speed a user may spin there mouse wheel. Thus we should shoot for achieving no catching while moving 10,000 px/sec.

I also observed the same issue with:

https://intity.github.io/epub-js/examples/paginated-continuous.html

When going to the next page, which has never been loaded before, there is a noticeable lag before the content appears. If you go back one page then forward again, there is no lag. Since I assume the content had already been loaded into memory.

It might be worth while to always having a few pages pre-loaded to improve the user experience. All that is left is to add the content when a scroll action approaches the bottom or the next page is requested. There really shouldn't be any memory or performance concerns with approach. But even so, we could make this configurable, including the number of pages to pre-load.

Edit:
Same issue with:

One thing I did notice for the paginated examples, if I scroll a few pages, exit the tab, then open the same link in a new tab, all the pages that I previously scrolled to load almost instantly when I try to go to them. But new pages have the aforementioned performance issue. Seems like there is some sort of caching going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions