Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!nsc!voder!apple!stadler From: stadler@Apple.COM (Andy Stadler) Newsgroups: comp.sys.mac.hypercard Subject: Re: HyperCard performance analysis with large datasets: Some answers Message-ID: <12727@apple.Apple.COM> Date: 23 Jun 88 21:04:25 GMT References: <5100@dasys1.UUCP> Reply-To: stadler@apple.apple.com.UUCP (Andy Stadler) Organization: Apple Computer Inc, Cupertino, CA Lines: 35 In article <5100@dasys1.UUCP>, Alexis Rosen talks about Hypercard performance with a large database. A few comments: (1) He mentions about a 2:1 ratio of size to text. Hypercard stores a fixed amount of data per card, plus X bytes for the buttons, fields, graphics, and script; and finally X bytes for the text in the fields. So in a large stack, it becomes that much more important to store as much _structure_ as possible in the background, and fill in only text on the cards. Depending on how much you're willing to put on a card (esp. can you use scrollering fields or not) I think you can do much better than 2:1. (2) With a huge stack like Alexis' it is CRUCIAL to compact the stack before searching. Hypercard tailors its search algorithm based upon an analysis of the text in the cards. When a fresh stack is created, simple values are chosen which will work well on a small-to-medium sized stack. But a huge stack, when compacted, will have those values re-adjusted for the larger amount of data. (3) Alexis mentions the use of search keys with more words but fewer letters. This is 1/2 right. Hypercard's search algorithm takes no hit for a longer search key, and in fact thrives upon it. But the part about three letters is, well, not the complete story. It's more complex than that. So the best method is to type a long search key, WITH all the words spelled out. And use 1.2.1! The searching has been greatly improved. By the way be sure to compact the stack with 1.2.1 to get the best search performance. Compacting doesn't just mean taking out the empty spots. A compacted stack is a complete reconstruction of the original, with a re-analysis of the data and a recoding of the compression & search algorithms, to optimize it for its current size & complexity. --Andy Stadler stadler@apple.com