-
|
Hi there. Excellent TOOL. Now experimenting with import!! I'm running the following command and on a ~90000 Photos libraryosxphotos import --exiftool --verbose --timestamp --no-progress --report import.csv --album CONVERT "/Volumes/Macintosh HD/Users/Shared/Pictures/Pictures/iPhoto/(...)/MOV01046.MOV" "/Volumes/Macintosh HD/Users/Shared/Pictures/Pictures/iPhoto/(...)/MOV04014.MOV" "/Volumes/Macintosh HD/Users/Shared/Pictures/Pictures/iPhoto/(...)/MOV00374.MOV" "/Volumes/Macintosh HD/Users/Shared/Pictures/Pictures/iPhoto/(...)/MOV01585.MOV"I get a fast upload on the 1st movie, but then one minute delay in between imports. Also at the end to write the report it takes 1 minute. MOV file sizes are not that big.
2023-01-11 20:27:36.142965 -- Importing /Users/Shared/Pictures/Pictures/iPhoto/(...)/MOV01046.MOV
2023-01-11 20:27:36.641196 -- Imported MOV01046.MOV with UUID F0C94316-9B8F-40F3-8311-1C74C364B6FB
2023-01-11 20:27:36.641894 -- Setting metadata and location from EXIF for MOV01046.MOV
2023-01-11 20:27:37.030127 -- No metadata to set for MOV01046.MOV
2023-01-11 20:27:37.031395 -- No location to set for MOV01046.MOV
2023-01-11 20:27:37.032802 -- Adding photo MOV01046.MOV to 1 album
2023-01-11 20:27:37.033163 -- Adding photo MOV01046.MOV to album CONVERT
2023-01-11 20:27:37.290056 -- Added MOV01046.MOV (F0C94316-9B8F-40F3-8311-1C74C364B6FB) to album CONVERT
2023-01-11 20:28:34.770483 -- Importing /Users/Shared/Pictures/Pictures/iPhoto/(...)MOV04014.MOV
2023-01-11 20:28:35.095857 -- Imported MOV04014.MOV with UUID E07D4B76-B3FC-4D6E-950E-D9F8D75906EA
2023-01-11 20:28:35.096320 -- Setting metadata and location from EXIF for MOV04014.MOV
2023-01-11 20:28:35.185843 -- No metadata to set for MOV04014.MOV
2023-01-11 20:28:35.186234 -- No location to set for MOV04014.MOV
2023-01-11 20:28:35.186904 -- Adding photo MOV04014.MOV to 1 album
2023-01-11 20:28:35.187195 -- Adding photo MOV04014.MOV to album CONVERT
2023-01-11 20:28:35.403891 -- Added MOV04014.MOV (E07D4B76-B3FC-4D6E-950E-D9F8D75906EA) to album CONVERT
2023-01-11 20:29:33.105296 -- Importing /Users/Shared/Pictures/Pictures/iPhoto/(...)/MOV00374.MOV
2023-01-11 20:29:33.456947 -- Imported MOV00374.MOV with UUID E9B7D7F8-3D7C-4174-9748-7D7EAFC701AD
2023-01-11 20:29:33.457495 -- Setting metadata and location from EXIF for MOV00374.MOV
2023-01-11 20:29:33.551093 -- No metadata to set for MOV00374.MOV
2023-01-11 20:29:33.551473 -- No location to set for MOV00374.MOV
2023-01-11 20:29:33.552007 -- Adding photo MOV00374.MOV to 1 album
2023-01-11 20:29:33.552286 -- Adding photo MOV00374.MOV to album CONVERT
2023-01-11 20:29:33.769769 -- Added MOV00374.MOV (E9B7D7F8-3D7C-4174-9748-7D7EAFC701AD) to album CONVERT
2023-01-11 20:30:31.449675 -- Importing /Users/Shared/Pictures/Pictures/iPhoto/(...)/MOV01585.MOV
2023-01-11 20:30:31.650394 -- Imported MOV01585.MOV with UUID 3C58AB3D-712A-461F-A313-8FA65E1B38D3
2023-01-11 20:30:31.650996 -- Setting metadata and location from EXIF for MOV01585.MOV
2023-01-11 20:30:31.760262 -- No metadata to set for MOV01585.MOV
2023-01-11 20:30:31.760662 -- No location to set for MOV01585.MOV
2023-01-11 20:30:31.761362 -- Adding photo MOV01585.MOV to 1 album
2023-01-11 20:30:31.761659 -- Adding photo MOV01585.MOV to album CONVERT
2023-01-11 20:30:32.014197 -- Added MOV01585.MOV (3C58AB3D-712A-461F-A313-8FA65E1B38D3) to album CONVERT
2023-01-11 20:31:30.476684 -- Wrote import report to import.csv
2023-01-11 20:31:30.477293 -- Done: imported 4 files, 0 errors, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 12 replies
-
|
import uses AppleScript behind the scenes which is slow. I'll have to look at what's happening between each photo but I'm surprised it takes a minute between photo -- that doesn't happen in my test case. That said, I do know that album & folder lookup is very slow if you have a lot of folders or albums and I've done a complete rewrite of the relevant parts of photoscript to significantly speed up folder/album access -- see this issue. The code is done I just have not gotten around to deploying it as I need to rewrite all the tests for Ventura before releasing. (I've been distracted on other interesting projects!) Once I get the new PhotoScript version pushed you should see some speed up. When I get a chance I'll add some instrumentation to import to figure out where that 1 minute delay is coming from. |
Beta Was this translation helpful? Give feedback.
-
|
Would be related with a database update? osxphotos/osxphotos/cli/import_cli.py Lines 1548 to 1549 in 106b258 |
Beta Was this translation helpful? Give feedback.
-
|
Great. Just added some clumsy ad-hoc timestamps before and after the Also checked that I had some Smart Albums which yield large number of pics/videos and were catching the imported videos on their filters. But I remove them but had no impact. 2023-01-14 00:16:56.477652 -- Adding photo MOV03474.MOV to album XXX
2023-01-14 00:16:56.664193 -- Creating album 'XXX'
2023-01-14 00:16:56.791115 -- Added MOV03474.MOV (2C005D3A-88AF-4E39-943C-722132FD162B) to album XXX
2023-01-14 00:16:56.791663 -- Before update_report_record /Users/Shared/Pictures/Pictures/(...)/MOV03474.MOV
2023-01-14 00:17:56.424713 -- After update_report_record /Users/Shared/Pictures/Pictures/(...)/MOV03474.MOV
2023-01-14 00:17:56.427133 -- After import_db /Users/Shared/(...)/MOV03474.MOV
2023-01-14 00:17:56.427511 -- After progress.advance /Users/Shared/Pictures/(...)/MOV03474.MOV
2023-01-14 00:17:56.427990 -- Importing /Users/Shared/Pictures/(...)/MOV04186.MOVAdded a bit more of debug... at it seems the time is taken while entering the function and executing but photo.albums has just one entry. report_record.albums = [a.title for a in photo.albums] |
Beta Was this translation helpful? Give feedback.
-
|
Further to this I've commented out the following... runs a bit faster but still sometime in between imports. Not 1 minute... but still ~25 seconds. Maybe my DB is just too big ?? ~90K pics. if False:
update_report_record(report_data[filepath], photo, filepath)
import_db.set(str(filepath), report_data[filepath])2023-01-14 01:16:53.164497 -- Importing /Users/Shared/Pictures/Pictures/(...)/MOV04495.MOV
2023-01-14 01:16:53.425340 -- Imported MOV04495.MOV with UUID 2CEC04E2-F1D2-4A75-8D23-D89F4F68ECAB
2023-01-14 01:16:53.425851 -- Setting metadata and location from EXIF for MOV04495.MOV
2023-01-14 01:16:53.826976 -- No metadata to set for MOV04495.MOV
2023-01-14 01:16:53.860147 -- Set location for MOV04495.MOV: 42.5769, 1.667764
2023-01-14 01:16:53.862213 -- Adding photo MOV04495.MOV to 1 album
2023-01-14 01:16:53.862599 -- Adding photo MOV04495.MOV to album iPhoto Events/XXX
2023-01-14 01:17:17.850100 -- Added MOV04495.MOV (2CEC04E2-F1D2-4A75-8D23-D89F4F68ECAB) to album iPhoto Events/XXX
2023-01-14 01:17:17.851715 -- Importing /Users/Shared/Pictures/Pictures/(...)/MOV04494.MOV
2023-01-14 01:17:18.107963 -- Imported MOV04494.MOV with UUID FBCEF30F-0D1C-434B-BD2D-457E91905D27
2023-01-14 01:17:18.108490 -- Setting metadata and location from EXIF for MOV04494.MOV
2023-01-14 01:17:18.226821 -- No metadata to set for MOV04494.MOV |
Beta Was this translation helpful? Give feedback.
-
|
I'm testing the new release with extra profiling/debug options now but your data supports what I thought the likely issue was: namely, in libraries with many albums and/or folders, the lookup with PhotoScript which is my wrapper around AppleScript and how I interact with the library to add photos, is very slow. I'm working on a refactor (See #36) and need to get that out. That fix should significantly boost performance. I have a design for an option that completely does away with AppleScript but that is months away. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the delay. With version osxphotos --profile import --no-progress --verbose --timestamp --no-progress --exiftool --album CONVERT --report "imported_mpg_files_{today}.csv" file1 file2 file2and output is: Profile output |
Beta Was this translation helpful? Give feedback.
Sorry I wasn't able to provide you with the debug.
But I've just now tested out version
0.56.3you just released and it's a breeze ;) GREAT!