| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Jan 30, 2007, at 09:20, kai wrote:
However, it might be worth mentioning that, when analysing a complex slide, the biggest delay in your repeat loop is caused by the number of external calls to PowerPoint. If the slide contains (say) 50 elements, then that's how many calls are made to get each individual shape.
It can be significantly faster to get all the comparison values in one hit, and then iterate through the list in AppleScript. With a busy slide, the following variation executes here some 3-4 times faster than the original. (While the code could be optimised further, the additional gains are not nearly as significant.)
[sniped code]
I compared these scripts:
These script test where the time is spent in Kay version:
-- Script 3 tell application "Microsoft PowerPoint" tell active presentation to set currentSlide to slide ¬ (current show position of its slide show window's slide show view) set types to placeholder type of currentSlide's place holders end tell
-- Script 4 tell application "Microsoft PowerPoint" tell active presentation to set currentSlide to slide ¬ (current show position of its slide show window's slide show view) end tell
All scripts saved as compiled scripts.
Here are some timings on my G5:
script 1 - best case: 115 milliseconds, worst case: 135 milliseconds script 2 - best case: 6 milliseconds, worst case 155 milliseconds scriot 3 - 111 milliseconds script 4 - 2 milliseconds
Times are averages of about 10 runs.
Attachment:
astime.zip
Description: Zip archive
Attachment:
lot of shapes.ppt 2.zip
Description: Zip archive
Best Regards,
Nir Soffer
_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/mailman//archives/applescript-users This email sent to email@hidden
| References: | |
| >Getting current slide title in PowerPoint 2004 (From: Nir Soffer <email@hidden>) | |
| >Re: Getting current slide title in PowerPoint 2004 (From: kai <email@hidden>) | |
| >Re: Getting current slide title in PowerPoint 2004 (From: Nir Soffer <email@hidden>) | |
| >Re: Getting current slide title in PowerPoint 2004 (From: kai <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.