openmicroscopy/bioformats — pull request #926 by ctrueden (2014-02-20 01:58:09+00:00)
Title: Cache OME-XML between ImagePluses

This branch fixes a critical memory issue when there are a large number of Images. In particular, multi-position datasets containing thousands of Image tiles will have OME-XML several MB in size, which gets replicated across every image tile. In one concrete case, we had a 1600 tile dataset where each tile is 4MB of pixels, and the OME-XML is 3MB, which nearly doubled memory usage requirements. With larger numbers of tiles the situation becomes even more dire.

The fix is simple: assign a reference to the same OME-XML string for every ImagePlus tile.