Skip to content

News_(2011)

John Cupitt edited this page Mar 29, 2017 · 1 revision

title: News (2011) permalink: /News_(2011)/

NOTOC

11 March 2011

We've just merged the vipsobject-image branch into master. The two main types in libvips, IMAGE and REGION, are now called VipsImage and VipsRegion and are subclasses of VipsObject.

We've shed about 1,000 lines of code, and removed a lot of old, useless API. The vips7 API is still there as a set of compatibility macros and functions (nip2, and vips outside of iofuncs, compile and pass all tests) but we now have a solid base for the new vips8 API. Hopefully.

Next comes attempting a VipsOperation class and perhaps moving something simple like im_invert over to it.

3 February 2011

We've moved libvips and nip2 from Sourceforge SVN to github. Thank you very much Sourceforge for the years of hosting.

The new repositories are here:

https://github.com/jcupitt

This change should make the projects easier to track and manage.

In other news, the documentation rewrite is finally complete, we have gtk-doc coverage for the whole API. To celebrate I've removed the old man pages from the repository, phew.

With Diuming Wen we've identified an interesting misbehaviour in libvips on OS X. Shrinking a 67875 by 54360 pixel 1-bit tiled tiff works reasonably well:

$ time vips --vips-progress im_shrink big1-tile-lzw.tif bigC.jpg 8 8
vips convert-for-save: done in 38s
real    0m40.644s
user    0m44.976s
sys     0m2.175s

But with a strip tiff, performance is terrible:

$ time vips --vips-progress im_shrink big1-strip-lzw.tif bigC.jpg 8 8
vips /var/folders/QT/QT79R4WP2RWo9k+1YsPrcU+++TI/-Tmp-/vips-1-EN89PV.v: done in 100s
vips convert-for-save: done in 757s
real    12m46.472s
user    0m29.496s
sys     0m13.078s

The problem is that the strip image must be unpacked to a temporary vips file before it can be processed. Then scanning the large (a 3.3GB file on my 2GB memory iMac) file floods memory as OS X aggressively caches everything. It even tries to page itself out to make more room, ouch.

The fix is to add the strange MAP_NOCACHE flag to mmap() under OS X. With this change (which is now in master, patch here) performance is much better:

$ vips --vips-progress im_shrink big1-strip-lzw.tif bigC.jpg 8 8
vips /var/folders/QT/QT79R4WP2RWo9k+1YsPrcU+++TI/-Tmp-/vips-1-72TYPV.v: done in 79s
vips convert-for-save: done in 154s
real    2m35.737s
user    0m29.285s
sys     0m12.631s

You can get it going even faster if you change the tiff to tiled with tiffcp:

$ tiffcp -t -w 128 -l 128 big1-strip-lzw.tif big1-tile2.tif
real    0m18.884s
user    0m14.199s
sys     0m2.587s
$ vips --vips-progress im_shrink big1-tile2.tif bigC.jpg 8 8
vips convert-for-save: done in 37s
real    0m39.967s
user    0m44.711s
sys     0m2.126s

Though perhaps that's cheating.

Clone this wiki locally