diff --git a/ChangeLog b/ChangeLog index 3195c391..3c2ea093 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ NOP - cast to unsigned int now removes <0 values - vips7 interface to openslide now supports :,level,associated options +- make vips8 cache smaller 13/3/12 started 7.28.2 - xres/yres tiffsave args were broken diff --git a/libvips/iofuncs/cache.c b/libvips/iofuncs/cache.c index 4434ded3..8acb9923 100644 --- a/libvips/iofuncs/cache.c +++ b/libvips/iofuncs/cache.c @@ -74,18 +74,23 @@ char *vips__cache_max_files = NULL; gboolean vips__cache_dump = FALSE; gboolean vips__cache_trace = FALSE; -/* Max number of cached operations. +/* Max number of cached operations. We are likely to trim due to memuse or + * file use before we hit this limit. */ static int vips_cache_max = 10000; /* How many tracked open files we allow before we start dropping cache. */ -static int vips_cache_max_files = 900; +static int vips_cache_max_files = 100; /* How much RAM we spend on caches before we start dropping cached operations - * ... default 1gb. + * ... default 100mb. + * + * It was 1gb, but that's a lot of memory for things like vipsthumbnail where + * there will be (almost) no reuse. Default low and let apps raise it if it'd + * be useful. */ -static size_t vips_cache_max_mem = 1024 * 1024 * 1024; +static size_t vips_cache_max_mem = 100 * 1024 * 1024; /* Hold a ref to all "recent" operations. */