Very slow code execution using dzsave in pyvips (Libvips)

Hi,

I am using pyvips (Libvips) to create tiles (small jpegs) from larger pyramid tifs (.svs-files).
It takes very long time to execute in Datalore. The below code block ran for more than 1 hour before I interupted the execution. By then the notebook/Datalore had created 385 jpegs (of 5450).

For comparison:

  1. Using Pycharm on my laptop produced 5450 jpegs in 79 sec.
  2. Using cloud notebook service from another service provider produced 5450 jpegs in 6 min 47 sec. (using their least expensive CPU)

The svs-file (47854.svs) is 512 MB

Code used in Datalore notebook:

import pyvips
import time
exec_start = time.perf_counter()
image = pyvips.Image.new_from_file('WSI/Liver/47854.svs')
image.dzsave('47854_TS_512', overlap=0, tile_size=512, depth="one")
exec_end = time.perf_counter()
print(f"Code execution in {exec_end - exec_start:0.4f} seconds")

Code used on laptop:

import pyvips
import time
exec_start = time.perf_counter()
image = pyvips.Image.new_from_file('47854.svs')
image.dzsave('C:/Localdata/47854_TS_512', overlap=0, tile_size=512, depth="one")
exec_end = time.perf_counter()
print(f"Code execution in {exec_end - exec_start:0.4f} seconds")