add im_tile_cache() to vips7 op db

try using this from nip2 instead of im_cache()

im_cache() uses vips_sink_screen() and is probably quite a bit slower
This commit is contained in:
John Cupitt 2014-05-09 14:56:44 +01:00
parent 25f2193992
commit 4d17ebb3b4
2 changed files with 41 additions and 0 deletions

16
TODO
View File

@ -1,12 +1,28 @@
- can we use postbuild elsewhere? look at use of "preclose" / "written", etc.
- why is cache in nip2 so slow? its awful
investigate again
is it using vips_sinkscreen()? should it use tilecache?
Cache calls cache in _stdenv.def
cache calls im_cache()
im_cache() calls vips_sink_screen()
im_tile_cache() calls vips_tilecache()
add im_tile_cache to vips7 op db, try using it from nip2
- test draw_mask on labq images

View File

@ -497,6 +497,30 @@ static im_function cache_desc = {
cache_args /* Arg list */
};
/* Call im_tile_cache() via arg vector.
*/
static int
tile_cache_vec( im_object *argv )
{
int tile_width = *((int *) argv[2]);
int tile_height = *((int *) argv[3]);
int max_tiles = *((int *) argv[4]);
return( im_tile_cache( argv[0], argv[1],
tile_width, tile_height, max_tiles ) );
}
/* Description of im_cache.
*/
static im_function tile_cache_desc = {
"im_tile_cache", /* Name */
"cache results of an operation",/* Description */
0, /* Flags */
tile_cache_vec, /* Dispatch function */
VIPS_NUMBER( cache_args ), /* Size of arg list */
cache_args /* Arg list */
};
/* im_binfile() args.
*/
static im_arg_desc binfile_args[] = {
@ -546,6 +570,7 @@ static im_function binfile_desc = {
static im_function *iofuncs_list[] = {
&binfile_desc,
&cache_desc,
&tile_cache_desc,
&concurrency_get_desc,
&getext_desc,
&guess_prefix_desc,