![]() |
![]() |
![]() |
![]() |
Because VIPS operations are free of side-effects*, you can cache them. Every time you call an operation, VIPS searches the cache for a previous call to the same operation with the same arguments. If it finds a match, you get the previous result again. This can give a huge speedup.
By default, VIPS caches the last 1,000 operation calls. You can also control the cache size by memory use or by files opened.
(* Some vips operations DO have side effects, for example,
will draw a circle on an image. These operations emit an “invalidate” signal on the image they are called on and this signal makes all downstream operations and caches drop their contents.)
vips_draw_circle()