• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Performance assistance please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Performance assistance please


  • Subject: Performance assistance please
  • From: "Andrew T. Lynch" <email@hidden>
  • Date: Tue, 1 Feb 2005 08:31:29 -0800

Hi All,
I'm a long time software developer and mac user, but new to applescript. I wrote the following to create albums in iphoto which could be easily burned to dvd. I have over 22,000 photos in my library, totalling about 40Gb. It works fine when I test it on a smaller library, but on a larger one, it just bogs down. I turned in event tracking, and you can see the first thousand or so images zip by, but by about 5000 or so they take a second or two each, and this is just the first phase where collecting the image paths. BTW, this is running on my new 2.5Ghz DP with 1.5G of ram. (happy birthday to me!). Thanks in advance for any assistance.


Cheers,
   Drew


set L to {} tell application "iPhoto" set theCount to the count of every photo repeat with i from 1 to theCount set thePhoto to photo i set thePath to the image path of thePhoto set the end of L to {iindex:i, ipath:thePath, isize:0} end repeat end tell tell application "Finder" repeat with i in (a reference to L) set thePath to the ipath of i set the isize of i to the size of ((thePath as POSIX file) as alias) end repeat end tell tell application "iPhoto" set L2 to {} set dvdcount to 1 set totalsize to 0 set albumname to "dvd_" & dvdcount new album name albumname set theAlbum to album albumname repeat with i in (a reference to L) set totalsize to totalsize + (isize of i) set the end of L2 to the iindex of i if totalsize > 4.0E+9 then repeat with j in (a reference to L2) add photo j to theAlbum end repeat set L2 to {} set totalsize to 0 set dvdcount to dvdcount + 1 set albumname to "dvd_" & dvdcount new album name albumname set theAlbum to album albumname end if end repeat repeat with j in (a reference to L2) add photo j to theAlbum end repeat end tell


- Andrew T. Lynch - Chief Zymurgist - Verisity Design Inc. - (650)934-6875

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Performance assistance please
      • From: Jake Pietrykowski <email@hidden>
  • Prev by Date: [ANN] Next Philadelphia Area AppleScript Users Group Meeting
  • Next by Date: Re: sending Apple events between users (Pause iTunes of different user, redux)
  • Previous by thread: [ANN] Next Philadelphia Area AppleScript Users Group Meeting
  • Next by thread: Re: Performance assistance please
  • Index(es):
    • Date
    • Thread