• 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: Copying the path of files selected in Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copying the path of files selected in Finder


  • Subject: Re: Copying the path of files selected in Finder
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 30 Apr 2017 22:13:50 -0500

On 04/30/2017, at 06:34, Emmanuel Lévy <email@hidden> wrote:
You must be right in some context, but as for me I see no difference, in both cases Finder requires 0.025 second per item selected.


Hey Emmanuel,

My best guess is that your system is faster than mine, since I'm using a Mid-2010 17" MacBook Pro with macOS 10.12.4.

How many selected files did you test with?

Try upping the number.

Tested with Smile 3.8.0 (build 988) using separate scripts.

Finder References:

------------------------------------------------------------------------------
chrono

# Finder References
tell application "Finder"
    set finderSelectionList to the selection
end tell

set elapsedTime to chrono
log "Finder Selection as Finder References List of " & length of finderSelectionList & " items:"
log " Elapsed Time:  " & (format elapsedTime into "##.#####") & " seconds"
log " Time per Item: " & (format (elapsedTime / (length of finderSelectionList)) into "##.#####") & " seconds"
log linefeed
------------------------------------------------------------------------------

Alias List:

------------------------------------------------------------------------------
chrono

# Alias List
tell application "Finder"
    set finderSelectionList to the selection as alias list
end tell

set elapsedTime to chrono
log "Finder Selection as Alias List of " & length of finderSelectionList & " items:"
log " Elapsed Time:  " & (format elapsedTime into "##.#####") & " seconds"
log " Time per Item: " & (format (elapsedTime / (length of finderSelectionList)) into "##.#####") & " seconds"
log linefeed
------------------------------------------------------------------------------

Finder Selection as Finder References List of 250 items:
 Elapsed Time:  1.31477 seconds
 Time per Item: 0.00526 seconds

Finder Selection as Alias List of 250 items:
 Elapsed Time:  0.49492 seconds
 Time per Item: 0.00198 seconds

------------------------------------------------------------------------------

Finder Selection as Finder References List of 500 items:
 Elapsed Time:  2.55785 seconds
 Time per Item: 0.00512 seconds

Finder Selection as Alias List of 500 items:
 Elapsed Time:  0.87233 seconds
 Time per Item: 0.00174 seconds

------------------------------------------------------------------------------

As you can see there's a significant difference – on my system at least.

--
Take Care,
Chris

 _______________________________________________
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: 
 >Copying the path of files selected in Finder (From: Jean-Christophe Helary <email@hidden>)
 >Re: Copying the path of files selected in Finder (From: Christopher Stone <email@hidden>)
 >Re: Copying the path of files selected in Finder (From: Emmanuel Lévy <email@hidden>)

  • Prev by Date: Browser tab
  • Next by Date: Re: Browser tab
  • Previous by thread: Re: Copying the path of files selected in Finder
  • Next by thread: display as text anomaly
  • Index(es):
    • Date
    • Thread