From 8970df2e1f1a75d792eb299e8c3150f9947ad4e4 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 8 Sep 2017 04:55:55 +0100 Subject: [PATCH] try disabling operation cache for magickload magickload can eat huge amounts of memory and disc, fon't keep it in the operation cache see https://github.com/jcupitt/libvips/issues/731 --- libvips/foreign/magickload.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libvips/foreign/magickload.c b/libvips/foreign/magickload.c index 7cbc1518..96f72e36 100644 --- a/libvips/foreign/magickload.c +++ b/libvips/foreign/magickload.c @@ -10,6 +10,8 @@ * - add @page option, 0 by default * 25/11/16 * - add @n, deprecate @all_frames (just sets n = -1) + * 8/9/17 + * - don't cache magickload */ /* @@ -95,6 +97,7 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; + VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; @@ -104,6 +107,10 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class ) object_class->nickname = "magickload_base"; object_class->description = _( "load with ImageMagick" ); + /* Don't cache magickload: it can gobble up memory and disc. + */ + operation_class->flags = VIPS_OPERATION_NOCACHE; + /* We need to be well to the back of the queue since vips's * dedicated loaders are usually preferable. */