exif library speed up

The exif library is very slow when processing a file, and sometimes a picture can be as high as hundreds of milliseconds. After researching it, it is because of the internal file reading strategy that only reads one or two bytes at a time, resulting in too slow disk operations. It has been specially modified, using the cache method to reduce the number of disk reads, and the efficiency is about three times higher.

The following is the test data:

It takes 1400 milliseconds for the first 5000 modifications,

It takes about 400 milliseconds to modify 5000 times

All of the above are tested using the release version compilation output.

Guess you like

Origin blog.csdn.net/henysugar/article/details/131355933