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.
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.
|