After two clean reinstallation of Sierra on my old iMac 2010 (for nothing) and still searching for solution for the slow pc / high CPU usage I found the photo problem amoung many others :O(
So if you are a lucky owner of an old and slow Mac with this problem.... you have two options before you buy a new Mac or windows machine.
1 option - remove photoes from your MAC and save on external device.
2 option: if you still insists to keep a huge number of pictures on your old MAC.
Then you need to do some internal work and say goodbye to the new photo features that came with Sierra.
Reboot your mac with CMD R and open terminal window and disable csrutil (security)
csrutil disable
-reboot normal
Kill some processes from terminal window with the command: "launchctl stop com.apple.photoanalysisd" and other photo....
While you still do something then you can add to the /etc/sudoers file via running
- sudo visudo and add the following default line below the other Default values
Defaults !tty_tickets
- exit from visudo
go to /System/Library/LaunchAgents/
easy way..copy plist file to home directory
- cp com.apple.photoanalysis.plist $HOME
edit the plist file and
change YES in MachServices to NO.
change YES in EnableTransactions to NO.
copy edited file back and overwrite original
- sudo cp $HOME/com.apple.photoanalysis.plist com.apple.photoanalysis.plist
remove photoanalysis file you find in the link in plist file Root.Label.Program.String
(or rename or move)
- rm /System/Library/PrivateFrameworks/PhotoanAlysis.framework/Versions/A/Support/photoanalysis
(It's probably sufficient to remove the files from launchctl)
- sudo launchctl remove PhotoAnalysis
sudo launchctl list | grep "oto"
sudo launchctl remove photomoments
sudo launchctl remove photolibr*
reboot with CMD R again and enable csrutil like you did in the beginning.