Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!killer!pollux!ti-csl!martin From: martin@ti-csl.CSNET (Steven Martin) Newsgroups: comp.sys.mac.hypercard Subject: Speed Degradation, Some Questions Message-ID: <39262@ti-csl.CSNET> Date: 4 Jan 88 04:25:51 GMT Reply-To: martin@home.UUCP (Steven Martin) Organization: TI Computer Science Center, Dallas Lines: 68 Keywords: large stacks, speed I've been dealing with a stack of 5000+ cards that takes up about 3meg and thought I'd post some observations about speed. I'm running a Mac II with 1Mb (3 more on order). The RAM Cache is on with 194K. Times are based on 1-2 tests around the last 10 cards of the stack and were timed with a digital watch. First of all the good news: 1) 'go to card x' where x is a NUMBER is still plenty fast (less than 1 second) 2) 'get field y of card x' where x is again a number is also plenty fast (less than 1 second). Now the bad news: 1) 'set the name of this card to "foo"' gets real slow (about 18 seconds) toward the end of the stack. 2) 'pop card' where the destination is toward the end of the stack is quite slow (up to 15 seconds within the same stack) 3) 'find "x"'. If you do this from the beginning of the stack it is fast as usual toward the beginning. If you are toward the end of the stack there is a ~7 second pause before cursor changes to a beachball, searching looks like it is just as fast as usual, then there is a ~10 second pause before the destination card is displayed. It looks to me like any kind of "go to card x" where x is a card id or card name gets extremely slow (linear search?). POP and FIND must be using this kind of "GO". I keep the stack sorted and use a binary search (get field x of card x is still fast!) in order to quickly go to a card. That solves the problem of getting to a certain card. QUESTIONS! I often have to find all occurrences of a certain phrase in the stack. This is a problem since the finds get real slow toward the end. Any ideas? If you have a function that is applied to its arguments while in one stack but is referred to by a script in another stack like: ... push card go to stack "foo" repeat with x = 1 to number of cards go next card function() end repeat pop card ... Is there a way to avoid thrashing back and forth between the two stacks? It seems to thrash sometimes and not others but I haven't figured out why. Thanx in advance for any help. -- Steve Martin USENET: {ctvax,im4u,texsun,rice}!ti-csl!martin PHONE: (214)-995-5919, 691-1450 If you think of something, it exists somewhere.