Juan Carlos Corona Romero
Juan Carlos Corona Romero
@jdempcy I'm using http://readium.firebaseapp.com with Accessible EPUB. The firstVisibleCFI call is taking 60-200ms on my Nexus 7 Gen 2*. Edit: Typo.. I meant Gen 2. Also I'm using the Chrome...
@jdempcy Thanks for sharing your investigation. Even with my own findings I can extrapolate that with 20-30 screens the performance can degrade to the levels that you are seeing. I'll...
@jmgeffroy You are right. From a run that took ~224ms. It was stuck in that function for 7ms. 
Let me annotate that flamegraph to explain what I see.
@jmgeffroy  It must have some significance because this is a place where the garbage collector seems to have run for an unusually...
@jmgeffroy Yes. I just browsed through the source mapped code and saw something similar to your screenshot. Thanks!
@jdempcy Give the branch of this PR a shot: https://github.com/readium/readium-shared-js/pull/371 It should help reduce the time taken by at least 30% I have some more ideas to reduce this further...
@jdempcy You also need to have readium-cfi-js set to the branch of this PR too: https://github.com/readium/readium-cfi-js/pull/59
I would also like to note that I tried to "clean up" usage of `$element[0]` vs just a direct reference `element` when passing along element refs in the private functions...
@jdempcy In regards to /4/NaN/.../NaN Are you using the scroll view in this scenario?