• 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
Re: Why Slow Then Fast
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why Slow Then Fast


  • Subject: Re: Why Slow Then Fast
  • From: Thomas Fischer <email@hidden>
  • Date: Wed, 02 Mar 2011 08:57:35 +0100

Hello Luther,

Am 01.03.2011 um 22:33 schrieb Luther Fuller:

set applPosixList to my getApplsList(the result)

-- less than 1 second elapsed to get here

set itemNamesList to {}
repeat with i from 1 to (count items of applPosixList)
set applPosixPath to (item i of applPosixList)
set itemNamesList to my formatAndWrite(applPosixPath, itemNamesList, leaders, fileRefNr)
end repeat

although this shouldn't make a big difference, I suppose it will be faster to run your loop as

repeat with 
applPosixPath
 in applPosixList
set itemNamesList to my formatAndWrite(applPosixPath, itemNamesList, leaders, fileRefNr)
end repeat

because it saves the overhead of counting the elements.

Best
Thomas


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Why Slow Then Fast (From: Luther Fuller <email@hidden>)

  • Prev by Date: [ANN] AppleScriptObjC Explorer
  • Next by Date: I have a "write to file" dream
  • Previous by thread: Re: Why Slow Then Fast
  • Next by thread: [ANN] AppleScriptObjC Explorer
  • Index(es):
    • Date
    • Thread