OpenSlide 3.3.1 released

Benjamin Gilbert bgilbert at cs.cmu.edu
Sun Oct 14 19:35:04 EDT 2012


On 10/14/2012 07:02 PM, Agelos Pappas wrote:
> does this mean that now it's safe to create a single openslide_t handle
> and use it in multiple threads to read data from a file?

It was always safe, but unfortunately that was never documented.  Before 
3.3.1, OpenSlide would hold a lock for the entirety of 
openslide_read_region, so you wouldn't get any parallelism if you did 
this.  We now read and decode tiles without any locks held.

> Would it be quicker now to use just one handle?

I hope so, but this will depend a bit on your access patterns.  If you 
do any measurements, please let us know what you discover.

Advantages of using a single openslide_t:

- Shared OpenSlide tile cache
- On Hamamatsu VMS, shared tile offset table.  (We have to scan the 
entire slide to compute this.)

Disadvantages:

- Tile cache capacity is shared across threads
- There is still *some* locking

Indifferent:

- If you read adjacent regions in parallel, you risk having OpenSlide 
decode the same tile twice.  For some slides, 3.3.1 now exports 
tile-size properties that you can use to try to avoid this.  This 
feature is "experimental" because it will never be possible for some 
slides (MIRAX), and because a better solution would be to make OpenSlide 
schedule work more intelligently.

--Benjamin Gilbert



More information about the openslide-users mailing list