Feature #610

Decoded metadata size

Added by Vladimir Nadvornik almost 13 years ago. Updated almost 13 years ago.

Start date:
26 Jan 2009
Due date:
% Done:


Estimated time:


It would be nice to have a method that reports the overall amount of memory occupied by ExifData, IptcData and XmpData.

I want to cache decoded metadata for several images in memory and it is hard to control the cache size because for example some Makernotes can be relatively big.



Updated by Andreas Huggel almost 13 years ago

That memory is potentially non-contiguous, do you want to cache it on the application level? Wouldn't you need to get it into a contiguous block of memory?

ExifData has a std::vector<Exifdatum>, Exifdatum has auto pointers for Key and Value and different Values have different kinds of containers and maybe a pointer to a data area. Adding memory accounting to these library classes to sum up everything - let alone predict the amount before the metadata is read - is not something I'm keen to do.

Maybe it is easier to look at this from outside of the library, eg, simply check the memory used before and after calling Image::readMetadata.

Or are you thinking of setting some memory aside, then use your own memory manager to populate it when the metadata containers are built?


Updated by Andreas Huggel almost 13 years ago

  • Status changed from New to Rejected

No further feedback. Closing this issue ("Won't fix").

Also available in: Atom PDF