You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says: std::string ExifKey::Impl::tagName() const is slow.
To Reproduce
I've been trying to track down why readMetadata is slow for my Sony a99ii ARW files. Slow as in order of magnitude to two slower than with JPEGs or TIFFs. Found one of the issues to be here:
It gets executed about two thousand times accumulating over 100ms. Converting a short unsigned int to a four-digit hex string shouldn't be that big of an issue. Testing around I found that the following cuts the time about three orders of magnitude. Feel free to substitute those three lines with something like the following. There's likely an even more efficient way but at this point it hardly matters for now. I'm down with metadata loading from 180ms to about 19ms but I'll have to dig around some more to see if there are other fairly obvious issues.
Expected behavior
I propose something like this instead of the three lines linked above. I'll defer to your judgement on the Endianness issues if any.
Sure, why not. Quick test shows it to be about 5x slower than what I wrote above but it does cut down two orders of magnitude so it should be much better already.
Describe the bug
As the title says:
std::string ExifKey::Impl::tagName() const
is slow.To Reproduce
I've been trying to track down why readMetadata is slow for my Sony a99ii ARW files. Slow as in order of magnitude to two slower than with JPEGs or TIFFs. Found one of the issues to be here:
exiv2/src/tags.cpp
Lines 182 to 184 in b917b34
It gets executed about two thousand times accumulating over 100ms. Converting a short unsigned int to a four-digit hex string shouldn't be that big of an issue. Testing around I found that the following cuts the time about three orders of magnitude. Feel free to substitute those three lines with something like the following. There's likely an even more efficient way but at this point it hardly matters for now. I'm down with metadata loading from 180ms to about 19ms but I'll have to dig around some more to see if there are other fairly obvious issues.
Expected behavior
I propose something like this instead of the three lines linked above. I'll defer to your judgement on the Endianness issues if any.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: