blasten / turn.js

The page flip effect for HTML5
www.turnjs.com
Other
7.23k stars 2.48k forks source link

Page turn too intensive for iOS. #317

Open josimard opened 11 years ago

josimard commented 11 years ago

When turning the page "Automatically" on iOS, some intensive process takes place making the webpage almost unusable. This happens when I call the $(flipbook).turn('page', pageIndex) function.

However it does not slow down when I manually curl a page by dragging it, it becomes slow again only when I release and the flipbook turns to a previous or next page. The animation is smooth when the page curl returns to the current page.

By making some profiling it seems calling $(flipbook).turn('page', pageIndex); invokes a lot of jQuery events. My two cents is that the bottleneck feels like the jQuery event propagation mechanisms and event handlers. ( versus animation limitations )

alQemist commented 11 years ago

My experience has been that response times for page turning is largely a function of content. What is the file size for your pages ?

josimard commented 11 years ago

File size does not seems to be the issue since curling the page is fine and performing great.

It really is when the book is turning by itself, it seems jQuery events are not up to the job, an interval would probably be a good replacement, but a lot of refactoring would be necessary since the book behavior and internal methods seems built around events.