When dealing with big bigtiff files (more than 60 GB), Out Of Memory errors happened during a getImageMetadata operation.
This happens because the current TIFF metadata classes setup a textual attribute to represent each TIFF Field value as an IIOMetadataNode in order to be compliant with the IIOMetadata framework.
Each element of the TileByteCounts and TileOffsets is converted as a String. For a 15 million tiles image, this can result into using a lot of memory: there are both 2 arrays of long made of 15 million elements as well as 15 million of Strings (attribute values) representing these longs.
We can setup a Set of tags to be excluded from being represented as textual attributes. TileByteCounts and TileOffsets are first candidates for that set.
Optionally, we can support a system property to support the "old" behaviour (converting each field to String) in case anyone need it for deep debug.