From 5f0f188659eec21f55ae41650cf8aace603329df Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 28 Mar 2014 09:48:27 +0000 Subject: [PATCH] drop the default max operations the cache defaulted to 10,000 operations, fine for nip2, not fine for batch-style applications thanks Rafael --- ChangeLog | 1 + libvips/iofuncs/cache.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c98df350..180de982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ - removed embedded thumbnail reader from vipsthumbnail: embedded thumbnails are too unlike the main image - fix to vipsthumbnail --crop, thanks Alessandro +- reduce default cache size to 1,000 operations 6/3/14 started 7.38.6 - grey ramp minimum was wrong diff --git a/libvips/iofuncs/cache.c b/libvips/iofuncs/cache.c index b25f5949..40cdbcdc 100644 --- a/libvips/iofuncs/cache.c +++ b/libvips/iofuncs/cache.c @@ -77,10 +77,12 @@ char *vips__cache_max_files = NULL; gboolean vips__cache_dump = FALSE; gboolean vips__cache_trace = FALSE; -/* Max number of cached operations. We are likely to trim due to memuse or - * file use before we hit this limit. +/* Max number of cached operations. + * + * It was 10,000, but this was too high for batch-style applications with + * little reuse. */ -static int vips_cache_max = 10000; +static int vips_cache_max = 1000; /* How many tracked open files we allow before we start dropping cache. */