Closed olivierkorner closed 8 years ago
I am in favor of merging this. My primary concern is how we can measure the change and how to determine that there are no downsides to it.
@rkwright I measured the time between the call to openPage and the moment the PAGINATION_CHANGED is emitted, in ReaderView, using the function window.performance.now. I displayed the 20 first pages of a content heavy book (many images, fonts...), measuring the rendering time for each page, without and with caching headers.
OK, thanks. I did see your data in the issue. I guess we'll just have to watch out for any unexpected behaviour that might result from the changes. But the upside is excellent. Thanks for doing this.
@danielweck - if you think the change is good, I am fine with your merging it into develop.
Thanks for addressing my minor concern about the duplicated / unused code block :)
This PR needs to target the develop branch though (not master).
Unfortunately the PR needs to be recreated in order to change the target branch from master
to develop
. I don't know any other way.
By the way @olivierkorner thanks a lot for doing the analysis + implementation, this is a great performance trick :)
And just so you know: the epubReadingSystem
script injection uses different "virtual" paths at each HTTP request, so that the returned payload never gets cached. That's because the HTTP request must always be intercepted for the injection to work.
See m_epubReadingSystem_Counter
in https://github.com/readium/readium-sdk/blob/develop/Platform/Apple/RDServices/Main/RDPackageResourceConnection.m#L40
it should provide a 10-30% speed boost to page rendering.