fix blocking of caching of seq load
we were setting nocache too late for the cache to see, move nocache logic to _build()
This commit is contained in:
parent
ebae3f7ed3
commit
63c1efc3b4
@ -2,6 +2,7 @@
|
|||||||
- fix compiler warnings in ubuntu 13.10
|
- fix compiler warnings in ubuntu 13.10
|
||||||
- reverse similarity rotation direction to match the convention used
|
- reverse similarity rotation direction to match the convention used
|
||||||
elsewhere in vips
|
elsewhere in vips
|
||||||
|
- fix blocked caching of sequential load operations
|
||||||
|
|
||||||
10/10/13 started 7.36.2
|
10/10/13 started 7.36.2
|
||||||
- better jpeg startup
|
- better jpeg startup
|
||||||
|
@ -690,10 +690,6 @@ vips_foreign_load_temp( VipsForeignLoad *load )
|
|||||||
printf( "vips_foreign_load_temp: partial sequential temp\n" );
|
printf( "vips_foreign_load_temp: partial sequential temp\n" );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
/* You can't reuse sequential operations.
|
|
||||||
*/
|
|
||||||
load->nocache = TRUE;
|
|
||||||
|
|
||||||
return( vips_image_new() );
|
return( vips_image_new() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,6 +829,13 @@ vips_foreign_load_build( VipsObject *object )
|
|||||||
|
|
||||||
g_object_set( load, "flags", flags, NULL );
|
g_object_set( load, "flags", flags, NULL );
|
||||||
|
|
||||||
|
/* If the loader can do sequential mode and sequential has been
|
||||||
|
* requested, we need to block caching.
|
||||||
|
*/
|
||||||
|
if( (load->flags & VIPS_FOREIGN_SEQUENTIAL) &&
|
||||||
|
load->access != VIPS_ACCESS_RANDOM )
|
||||||
|
load->nocache = TRUE;
|
||||||
|
|
||||||
if( VIPS_OBJECT_CLASS( vips_foreign_load_parent_class )->
|
if( VIPS_OBJECT_CLASS( vips_foreign_load_parent_class )->
|
||||||
build( object ) )
|
build( object ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
@ -692,7 +692,7 @@ vips_cache_operation_buildp( VipsOperation **operation )
|
|||||||
|
|
||||||
if( (hit = g_hash_table_lookup( vips_cache_table, *operation )) ) {
|
if( (hit = g_hash_table_lookup( vips_cache_table, *operation )) ) {
|
||||||
if( vips__cache_trace ) {
|
if( vips__cache_trace ) {
|
||||||
printf( "vips cache: hit\n" );
|
printf( "vips cache: found old operation\n" );
|
||||||
printf( "\t" );
|
printf( "\t" );
|
||||||
vips_object_print_summary( VIPS_OBJECT( hit ) );
|
vips_object_print_summary( VIPS_OBJECT( hit ) );
|
||||||
}
|
}
|
||||||
@ -718,7 +718,7 @@ vips_cache_operation_buildp( VipsOperation **operation )
|
|||||||
VIPS_OPERATION_NOCACHE )
|
VIPS_OPERATION_NOCACHE )
|
||||||
printf( "vips cache: uncacheable\n" );
|
printf( "vips cache: uncacheable\n" );
|
||||||
else
|
else
|
||||||
printf( "vips cache: miss\n" );
|
printf( "vips cache: caching new operation\n" );
|
||||||
printf( "\t" );
|
printf( "\t" );
|
||||||
vips_object_print_summary( VIPS_OBJECT( *operation ) );
|
vips_object_print_summary( VIPS_OBJECT( *operation ) );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user