Bug #1374

excessively often calls stat()

Added by Johannes Berg 5 months ago. Updated 5 months ago.

Status:ClosedStart date:03 Nov 2018
Priority:NormalDue date:
Assignee:Robin Mills% Done:


Category:basicioEstimated time:6.00 hours
Target version:0.27


I've found that when reading PNG files, (lib)exiv2 calls stat() excessively often:

$ strace -e stat exiv2 /path/to/image.png 2>&1|grep stat|wc -l

Yes, the file in question is 114MB, but there's no good reason to call stat() on it over and over since it's unlikely to change in the time it takes to read :-)
(also, given the various relatively reason security mitigations, doing syscalls has gotten slower)


#1 Updated by Robin Mills 5 months ago

  • Category set to basicio
  • Status changed from New to Closed
  • Assignee set to Robin Mills
  • Target version set to 0.27
  • % Done changed from 0 to 100
  • Estimated time set to 6.00

Discussion of this has been moved to: https://github.com/Exiv2/exiv2/issues/515

This matter will get attention in Exiv2 v0.28. I'm closing it here on Redmine.

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux