Skip to content

vipsthumbnail takes 14 seconds for one tiff file #1784

@tand826

Description

@tand826

Describe the bug
vipsthumbnail CMU-1.tiff with libvips 8.10.0 takes 14 seconds to save its thumbnail while libvips 8.9.2 saves in 0.004sec.

To Reproduce

  1. Use Image CMU-1.tiff or another one (both reproduce the bug)
  2. Install libglib2.0-dev libexpat1-dev libtiff5-dev libjpeg62-turbo-dev libgsf-1-dev openslide-tools libpng-dev
  3. Install vips8.10.0 from tarball
stdout of "vips --vips-config"

native win32: no
native OS X: no
open files in binary mode: no
enable debug: no
enable deprecated library components: yes
enable docs with gtkdoc: no
gobject introspection: no
enable radiance support: yes
enable analyze support: yes
enable PPM support: yes
use fftw3 for FFT: no
Magick package: none
Magick API version: none
load with libMagick: no
save with libMagick: no
accelerate loops with orc: no
ICC profile support with lcms: no
file import with niftiio: no
file import with libheif: no
file import with OpenEXR: no
file import with OpenSlide: no
file import with matio: no
PDF import with PDFium: no
PDF import with poppler-glib: no
SVG import with librsvg-2.0: no
zlib: yes
file import with cfitsio: no
file import/export with libwebp: no
text rendering with pangoft2: no
file import/export with libspng: no
file import/export with libpng: yes (pkg-config libpng >= 1.2.9)
support 8bpp PNG quantisation: no
file import/export with libtiff: yes (pkg-config libtiff-4)
file import/export with giflib: no
file import/export with libjpeg: yes (pkg-config)
image pyramid export: yes
use libexif to load/save JPEG metadata: no

  1. Run the command
vipsthumbnail CMU-1.tiff

Expected behavior
Saves thumbnail image data to disk in a moment.

Actual behavior
vipsthumbnail takes about 14 sec to save "tn_CMU-1.jpg". With "--vips-progress" argument, stdout is like below.

$ vipsthumbnail CMU-1.tiff --vips-progress
vipsthumbnail temp-21: 128 x 92 pixels, 36 threads, 128 x 128 tiles, 640 lines in buffer
vipsthumbnail temp-21: done in 14.4s

Environment

  • OS: Debian 10
  • Vips: 8.10.0

Additional context

  • After reinstalling libvips8.9.2, vipsthumbnail worked perfectly.
  • tiles are 128 x 128 with 8.10.0, but 128 x 16 with 8.9.2.
# with libvips8.9.2
$ vipsthumbnail CMU-1.tiff --vips-progress
vipsthumbnail temp-24: 128 x 92 pixels, 36 threads, 128 x 16 tiles, 640 lines in buffer
vipsthumbnail temp-24: done in 0.00452s 
  • pyvips.Image.thumbnail("CMU-1.tiff", 128) finishes less than a second with both libvips8.10.0 and libvips8.9.2.
  • pyvips.Image.thumbnail("CMU-1.tiff", 128).jpegsave("thumb.jpg") finishes in 14 second with libvips8.10.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions