• 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: possible bug? Radically different time profile for list access in script objects or by explicit reference.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible bug? Radically different time profile for list access in script objects or by explicit reference.


  • Subject: Re: possible bug? Radically different time profile for list access in script objects or by explicit reference.
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 8 Mar 2002 12:00:16 -0800

On Friday, March 8, 2002, at 08:17 AM, Michael Sullivan wrote:

In a discussion of sorts, and just how much faster Serge's qsort is than
a number of other folk's attempts at an n log n sort -- it came up that
applescript has a radically different time profile for accessing lists
through a reference (or encoded in a script object). The standard
handling is *far* slower on long lists.

Paul skinner writes:

I'd like to see a comment from Chris N. on this one.

My guess is that a temporary copy of the list is being made every time
an item is accessed, even if the list will not be changed. Explicitly
specifying a reference (which probably happens internally if using a
script object), tells the interpreter that the existing list can be
used.

My guess is that there's a missing "const &" (or whatever the equivalent
construct is in the language actually used -- 'const &' is C++) in some
important function prototypes in the list code.

Should this be submitted as a bug report?

It already has been. If the cause was as simple as Paul guesses, I would have fixed this a long time ago, but unfortunately it's not. AppleScript takes a number of precautions to protect itself against circular structures, and one of them leads to this slow-down. I'm not convinced that it really needs to do this, but changing it is not something to take lightly.


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: possible bug? Radically different time profile for list access in script objects or by explicit reference.
      • From: email@hidden (Michael Sullivan)
References: 
 >possible bug? Radically different time profile for list access in script objects or by explicit reference. (From: email@hidden (Michael Sullivan))

  • Prev by Date: Re: problems with german characters
  • Next by Date: Re: Scripting Palm Desktop
  • Previous by thread: possible bug? Radically different time profile for list access in script objects or by explicit reference.
  • Next by thread: Re: possible bug? Radically different time profile for list access in script objects or by explicit reference.
  • Index(es):
    • Date
    • Thread