make vips8 cache smaller

This commit is contained in:
John Cupitt 2012-04-12 08:41:40 +01:00
parent 7ef00a3d7e
commit b47ad26f50
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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.
*/