AppleScript and Performance

Using GarageSale Version 7.0.14b3 (831), macOS Version 10.12.6 (16G1212)

How do I get the AppleScript Menu to show up with my User scripts in v7??
Or do we just need to run all scripts from the Script Editor app??

AppleScript Dictionary “listing image n : A GarageSale listing image” description is wrong:
is gallery image (boolean) : Whether it is the gallery image.
is URL image (boolean, r/o) : Whether it is the gallery image. (Should be “Whether it is a URL image.”)

AppleScript processing is SLOW! Even for a simple script to just get the title of a listing.

Below are 2 simple sample AppleScripts, one for v6.9.8 and one for v7.

tell application “GarageSale”
set theListings to (get selected ebay listings) – every ebay listing
repeat with aListing in theListings
set listingTitle to title of aListing
end repeat
end tell

Open “GarageSale 6.9.8”, select several templates, like 15, and run script. Takes <1 second.
Open GarageSale (v7), select several templates, like 15, and run script. Takes 4 second!

Now, try both scripts with 200 templates/listings selected.
v6 takes 4-9 seconds and v7 takes 42 seconds!

I’m afraid to run any of my scripts for “every ebay listing”… :slight_smile:

Activity Monitor shows GS v7 with >100% CPU usage. Spindump included below.

AppleScript GSv6 GetTitles.scpt.zip (15.8 KB)
AppleScript GSv7 GetTitles.scpt.zip (3.4 KB)
AppleScript GarageSale_8356.spindump.txt.zip (607.1 KB)

1 Like

Looking forward to a response to this from the GarageSale, team.

In Script Editor go to general preferences and check ‘show script menu in menu bar’.
Then make a folder called Garage Sale in the Computer Script folder and drag all the GS scripts you use into this folder. All will be assessable from the menu bar drop down.

Steve

1 Like

AppleScript retrieves the list of all eBay listings very often.

In GarageSale 6, that list was maintained (and probably cached) by the database backend. GarageSale 7 does not cache this list, so each time AppleScript asks for that list, it is build anew by scanning the database for matching objects.

Since the list of all listings isn’t used in GarageSale besides by the AppleScript interface, we haven’t optimised it yet. I made a ticket to do so.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.