performance tradeoffs

Benjamin Gilbert bgilbert at
Thu Dec 15 00:09:05 EST 2016

On Thu, Dec 08, 2016 at 01:12:56PM +0000, j.hudecek--- via openslide-users wrote:
> I'm struggling with performance of OpenSlide to dynamically generate tiles
> for OpenSeadragon from images stored on a network drive.
> Some tiles load in 50ms (usually the bottom level) but some take 2s or
> more - some images only have two layers so OpenSlide needs to read huge
> pieces of image (I've seen up to 16 times the size of resulting tile) to
> satisfy my deepzoom request.

Slides without low-resolution levels just aren't going to perform well when
zoomed out.  The best you can do is precompute, cache, or prevent generation
of those DZ levels.  OpenSeadragon can also be configured not to load the
smallest DZ levels, which can reduce the impact of the initial "progressive
enhancement" phase when loading a DZ image.

> I attached procmon when reading the files and it seems that OpenSlide is
> making a lot of overlapping 4K reads unaligned to 4K.  Is it possible to
> force it to use a larger buffer for example?

With most slide formats, OpenSlide should be reading an entire slide tile at
once, and I wouldn't expect overlapping reads.  What format are you using? 
Could you post an I/O trace?

> It also seems that tile size (for the Deepzoom) makes a lot of difference. 
> Would it make sense to tweak it based on the underlying image and its tile
> size (if it's a pyramidal image)?

The DZ tile size should primarily affect the number of round trips from
OpenSeadragon to your server.  I wouldn't expect major gains from tuning it
based on the slide's tile size.

--Benjamin Gilbert

More information about the openslide-users mailing list