AppleScript: Some Commands Hang with Large Catalogs
I have noticed that when operating on a large Catalog (15000 images), any AppleScript command that attempts to retrieve all the variants or all the images causes COP to hang. The Applescript process will time out but the memory allocated to COP slowly grows - eventually the RAM is completely allocated and 10's of GB of Swap have been allocated - in several cases I have observed that OSX itself hangs and a reboot is needed. Over 50GB in the case of my 15000 image catalog.
The need for a reboot can be avoided by killing Capture One 10 as soon as Memory Pressure becomes yellow or when the AppleScript times out, whichever comes first. (Killing COP will put your catalog DB at risk)
I have opened a support request, and a bug ticket has been raised.
I have observed some cases where OSX doesn't hang (but COP still hung) - it's possible that this was correlated with using the AppleScript "with Timeout 700 seconds" command.
If the Mac processes have become very slow, it may not be possible to Force quit Capture one from the Dock Icon or the Force Quit menu, and it may not be possible to start the Activity Monitor or stop Capture One from the Activity Monitor.
My workaround of last resort is to have a terminal session already running, and execute: pkill "Capture One*" - you may have to use it as sudo.
Either via the monitor and key board, or SSH into Mac from another machine.
I was forced to change my approach on scripts for large catalogs, and proceed by selecting variants and images in the user collections.
The AppleScript a affected are all the "get" commands in the following script:
The need for a reboot can be avoided by killing Capture One 10 as soon as Memory Pressure becomes yellow or when the AppleScript times out, whichever comes first. (Killing COP will put your catalog DB at risk)
I have opened a support request, and a bug ticket has been raised.
I have observed some cases where OSX doesn't hang (but COP still hung) - it's possible that this was correlated with using the AppleScript "with Timeout 700 seconds" command.
If the Mac processes have become very slow, it may not be possible to Force quit Capture one from the Dock Icon or the Force Quit menu, and it may not be possible to start the Activity Monitor or stop Capture One from the Activity Monitor.
My workaround of last resort is to have a terminal session already running, and execute: pkill "Capture One*" - you may have to use it as sudo.
Either via the monitor and key board, or SSH into Mac from another machine.
I was forced to change my approach on scripts for large catalogs, and proceed by selecting variants and images in the user collections.
The AppleScript a affected are all the "get" commands in the following script:
tell application "Capture One 10"
set COPprops to get properties
log "Properties: " & (count of COPprops)
set AppEveryVar to get all variants
log "Application Variants: " & (count of AppEveryVar)
set AppSelectedVar to get all variants -- affected if all images in the Catalog are selected
log "Application Variants: " & (count of AppSelectedVar)
tell document 1
set DocEveryVar to get every variant
log "Document Variants: " & (count of DocEveryVar)
set DOCEveryImage to get every image
log "Document Images: " & (count of DOCEveryImage)
tell collection 1 - collection 1 of document 1 is the All Images folder
set CollEveryVar to get every variant
log "collection Variants: " & (count of CollEveryVar)
set CollEveryImage to get every image
log "collection Images: " & (count of CollEveryImage)
end tell
end tell
end tell
0
Post ist für Kommentare geschlossen.
Kommentare
0 Kommentare