Practical limits on object counts

Richard Gaskin ambassador at fourthworld.com
Sat Oct 3 12:20:03 EDT 2009


Paul Foraker wrote:

 > On Fri, Oct 2, 2009 at 5:44 PM, Richard Gaskin
 > <ambassador at fourthworld.com> wrote:
 >> Have any of you worked on stacks with an insane number of objects
 >> on a card (>5,000)?
 >>
 >> What issues did you encounter?
 >
 > I have a bead pattern generator that dynamically clones a small
 > graphic to produce 4,634 of them arranged according to dimensions and
 > patterns set by the user. There are also some fields and buttons,
 > bringing the total number of controls to 4,646. It takes about 2
 > seconds to render on an iMac with the screen locked. When you mouse
 > down on the inspection arrow in the Property Inspector, you get a
 > disabled item: "Too many controls to display [4646]". There aren't too
 > many fields or buttons to display, but it doesn't care. :)

Maybe it meant "Too many for the IDE to display", since it seems the 
engine is fine. :)

I wonder exactly what their threshold is for "too many", and how they 
arrived at it when they wrote their IDE.

The more I played around with my tests, the more I see a very dramatic 
difference in responsiveness beyond a certain threshold somewhere beyond 
6,000 objects.  I haven't yet pinned it down exactly, but definitely 
10,000 is beyond acceptable for most uses, so it's somewhere between 6k 
and 9k.

The difference between 6k and 9k objects is so dramatic that I have to 
wonder if there's some aspect of how the engine's memory mapping or 
object hashes were written that may play a role in the sharp performance 
degradation.

I dunno.  I just know not to try working with 9k objects. ;)

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv



More information about the use-livecode mailing list