These are chat archives for openseadragon/openseadragon

14th
Sep 2015
LarissaSmith
@LarissaSmith
Sep 14 2015 17:27
@iangilman gechols mentioned a problem in the recent commits that makes tiled images load tiles from every level, 0 - 8, causing a performance hit. I started investigating the issue and found that the problem is in tilesource.getClosestLevel(). The change to allow non-square tiles broke it. On line 335 of tilesource.js, there is a condition checking tilesPerSide.x and tilesPerSide.y and breaking the loop when the compare value exceeds the shortest side of the tiledImage. This differs from the old behavior because it used to compare the value against the longest side. Simply changing the || to an && fixes the problem for us, but without a better understanding of the purpose of getClosestLevel, I don't know if that is the proper fix.
Ian Gilman
@iangilman
Sep 14 2015 17:50
@LarissaSmith Awesome, thank you for tracking that down!
I'll look at the non-square patch, but I'm guessing just making the change you propose should be sufficient.
Ian Gilman
@iangilman
Sep 14 2015 18:00
@LarissaSmith Yeah, I think just changing the || to an && is the right thing, based on looking at the diff.
Would you be up for making a patch for that?
LarissaSmith
@LarissaSmith
Sep 14 2015 23:08
Sure thing.
Ian Gilman
@iangilman
Sep 14 2015 23:14
Awesome :)