Skip to content

Commit

Permalink
make linecache 50% larger
Browse files Browse the repository at this point in the history
  • Loading branch information
jcupitt committed Nov 12, 2012
1 parent 2f11497 commit b03d48e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- remove options from format string in .dzi (thanks Martin)
- vipsCC.pc required the wrong version of vips (thanks Alessandro)
- larger max tile size for dzsave
- linecache is 50% larger to leave some slop room

13/9/12 started 7.30.3
- linecache sized itself too large
Expand Down
7 changes: 5 additions & 2 deletions libvips/conversion/tilecache.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* - use a hash table instead of a list
* 13/9/12
* - oops, linecache was oversized
* 12/11/12
* - make linecache 50% larger to give some slop room
*/

/*
Expand Down Expand Up @@ -662,13 +664,14 @@ vips_line_cache_build( VipsObject *object )
*/
block_cache->tile_width = block_cache->in->Xsize;

/* Enough lines for two complete buffers.
/* Enough lines for two complete buffers would be exactly right. Make
* it 3 to give us some slop room.
*
* This can go up with request size, see vips_line_cache_gen().
*/
vips_get_tile_size( block_cache->in,
&tile_width, &tile_height, &nlines );
block_cache->max_tiles = 2 * (1 + nlines / block_cache->tile_height);
block_cache->max_tiles = 3 * (1 + nlines / block_cache->tile_height);

VIPS_DEBUG_MSG( "vips_line_cache_build: max_tiles = %d, "
"tile_height = %d\n",
Expand Down

0 comments on commit b03d48e

Please sign in to comment.