flingo64 / PhotoStation-Upload-Lr-Plugin

Photo StatLr (aka PhotoStation Upload) is a Lightroom Publish and Export Service Plugin that enables the export /publishing of photos and videos from Lr to a Synology Photo Station. It uploads the photos/videos and all required thumbnails. It can download comments and ratings and do a real two-way synch of various metadata (tags, ratings, labels).
http://messmer-online.de/index.php/software/11-photo-statlr
GNU General Public License v3.0
209 stars 21 forks source link

Multi-thread export #47

Closed twilightgod closed 3 years ago

twilightgod commented 4 years ago

Sorry to re-open my previous issue. In normal Lightroom publish to hard drive, it will use multiple threads and multiple CPU to export RAW to JPEG, it's very fast. But when I use this plug-in, it seems to export photo one by one, it's extremely slow for me, I have 1000+ photo needs to publish to the same album

You can start multiple publishing jobs in Lr in parallel.

Originally posted by @flingo64 in https://github.com/flingo64/PhotoStation-Upload-Lr-Plugin/issues/46#issuecomment-674575223

flingo64 commented 3 years ago

Photos are always exported one by one, regardless of the Export plugin, that's the way the plugin API works. But even under this conditions you'll see at least 4 processors doing heavy work most of the time during Photo StatLr Export (because the thumbnail generation is multi-threaded). Comparing Harddisk Export and Photo StatLr Export makes only sense, if you switch off thumbnail generation in Photo StatLr. Then you'll see roughly 100% cpu usage on all processors and roughly the same export speed as with Harddisk Export: no big deal if the plugin has nothing more to do than saving the photos.

twilightgod commented 3 years ago

Hard drive publish is at least 3x~4x faster than Photo StatLr, so generating thubnail is much slower than export the photo from RAW to JPEG?

flingo64 commented 3 years ago

The plugin generates and uploads 4 additional thumbnails in different sizes in addition to the RAW2JPEG conversion which has to be done by Lr in both cases. So, what you have to compare is the time of generating 4 thumbnails and uploading them to the Photo Stattion via the PhotoStation Upload API to storing one photo on a local drive. Yes, the thumbnail generation via ImageMagick's convert tool takes most of the time. You can see timestamps for each step of the plugin processing in the Logfile when you set the loglevel to 'Trace' or 'Debug' . One optimization, though: if you use a newer ImageMagick 64-Bit version instead of the older 32-Bit version that ships with the Synology Photo Station Uploader you will see better performance with higher processor utilization on all CPUs (15% on Core i7 with 12 CPUs).

twilightgod commented 3 years ago

Thanks for explanation!