insert should be smalltile

Joins can get very wide (eg. consider joining a set of tiles horizontally
to make a large image), we don't want mem use to grow as O(N**2). SMALLTILE
will guarantee we keep small and local.
This commit is contained in:
John Cupitt 2015-02-26 13:02:56 +00:00
parent 1fca9a6350
commit a252a35794
1 changed files with 8 additions and 2 deletions

View File

@ -384,8 +384,12 @@ vips_insert_build( VipsObject *object )
insert->main_processed, insert->sub_processed, NULL )) )
return( -1 );
/* Joins can get very wide (eg. consider joining a set of tiles
* horizontally to make a large image), we don't want mem use to shoot
* up. SMALLTILE will guarantee we keep small and local.
*/
if( vips_image_pipeline_array( conversion->out,
VIPS_DEMAND_STYLE_ANY, arry ) )
VIPS_DEMAND_STYLE_SMALLTILE, arry ) )
return( -1 );
/* Calculate geometry.
@ -456,7 +460,9 @@ vips_insert_class_init( VipsInsertClass *class )
_( "insert image @sub into @main at @x, @y" );
vobject_class->build = vips_insert_build;
operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED;
/* Can't be UNBUFFERED, we are a SMALLTILE operation.
*/
operation_class->flags = VIPS_OPERATION_SEQUENTIAL;
VIPS_ARG_IMAGE( class, "main", -1,
_( "Main" ),