Replies: 2 comments 2 replies
-
|
exifr: explains all this. I think we need a binary solution for large galleries to check if file has EXIF or not, as first filter. Maybe write in Zig or Rust lang |
Beta Was this translation helpful? Give feedback.
-
|
This is more just a high level thought than a suggestion, please take it as such as I respect @bpatrik's clearly in depth analysis and goals for the project. It seems like with the last commit to exifr being over 4 years ago now, at some point a change in libraries will be necessitated whether to support new features or for maintainability. At what point would those (or other) reasons outweigh the clear performance advantage that exifr has? With hardware speeds increasing all the time, and I assume many PiGallery2 users running indexing in batch (at night), is indexing speed the trump card? I can say for my use case (I'm running on a huge server) that the speed of the video transcoding will always dwarf the speed of indexing for me. Sure every so often I might add a picture and immediately view it before I run indexing, but then if it took an extra few seconds to index those pictures it wouldn't be the end of the world. Just providing one users perspective. Feel free to disregard. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I asked AI to plot up a quick perfomarnce benchmark. Here is the result:
NOTE: Report and test are fully AI generated, so take it with a hint of salt
Benchmark run on the demo folder of this project, so anyone can recreate it.
I. Report
exifr vs exiftool-vendored Performance Analysis
Executive Summary
The benchmark results clearly demonstrate that exifr significantly outperforms exiftool-vendored on Windows, with performance differences ranging from 6x to 66x faster depending on configuration.
Test Environment
Benchmark Results
Performance Summary
*Note: The optimized concurrent average time appears inflated due to measurement methodology - individual file times were higher due to process coordination overhead.
Key Findings
exifr concurrent processing is dramatically faster:
Windows process spawning penalty confirmed:
Memory efficiency:
Error handling:
Analysis of exiftool-vendored Author's Suggestions
The exiftool-vendored author's suggestions were implemented in our optimized test:
Despite these optimizations, exiftool-vendored still performed significantly slower due to:
Recommendations
For PiGallery2 (Performance-Critical Application)
Recommendation: Continue using exifr
Reasons:
When exiftool-vendored Might Still Be Considered
Consider exiftool-vendored only if:
Hybrid Approach (If Needed)
If specific exiftool features are required:
Performance Impact on PiGallery2
Based on these results, switching to exiftool-vendored would:
For a Raspberry Pi deployment processing hundreds or thousands of photos, this would translate to:
Conclusion
The benchmark confirms your initial concern about exiftool-vendored performance on Windows. The dramatic performance difference (66x slower) makes exiftool-vendored unsuitable for PiGallery2's use case, especially given the application's focus on Raspberry Pi deployment where performance is critical.
Final Recommendation: Keep using exifr for PiGallery2's metadata extraction needs.
II. Benchmark code:
Beta Was this translation helpful? Give feedback.
All reactions