Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!agate!shelby!ucscc.ucsc.edu!gorn!filbo From: filbo@gorn.santa-cruz.ca.us (Bela Lubkin) Newsgroups: comp.sys.amiga.tech Subject: Re: Layers speed (was Re: 1.4 Wish: Revamped sizing gadget) Message-ID: <66.filbo@gorn.santa-cruz.ca.us> Date: 27 Oct 89 14:55:52 GMT References: <8779@ardent.UUCP> Organization: R Pentomino Lines: 50 X-Claimer: I >am< R Pentomino! In article <8779@ardent.UUCP> (comp.sys.amiga) Rob Peck writes: > The use of SMART_REFRESH does, at times, slow things down, but NOWHERE near > as much slowdown as when someone uses a GIMMEZEROZERO window. > a GIMMEZEROZERO window prevents Intuition from rendering its gadgets and > borders into the superbitmap. Intuition does this by providing -->5<--- > layers totally, one for the drawable area, one for the top, bottom, left, > and right edges of the window. THATS when operations on windows can really > get bogged down. Could this alternatively be implemented by TWO layers, one for the drawable area and one that covers the entire window? This would waste a bunch of memory, but might be a good choice for systems with more chip memory than needed. Anyone want to write a PD hack that does this? Ultimately it would be good as a Preferences type switch, of course. An even worse hack would be to do the above, then free up the memory for those parts of the whole-window bitmap that we "know" will never be written to or displayed. i.e. allocate a big bitmap, then free up the interior parts of the center lines. (I don't know what effect this would have on memory fragmentation... not good, I'm sure) (figures "A" & "B"): +--------------+ +--------------+ +--------------+ | | | +----------+ | border stuff | +----------+ | fig. | | --> | | freed up |*| rendered in |*| CONTENTS | | C | | | +----------+ | "*" areas... | +----------+ | +--------------+ +--------------+ +--------------+ fig. A fig. ^^ ^^^^^^^^^^ || Layer used by Layer into which Intuition is told to render border stuff applications WAIT A SEC! Can we not place the "contents" part in "freed up"?!? Then the bitmap for the window looks just like it should. Layers etc. are purely a logical thing. WHY are GZZ windows not implemented as a single bitmap and two layers? Will Intuition try to render into the "contents" part of the window just because the layer says that's part of the window? Won't it stick to the border areas like it visually appears to? (Figure "C"). [Note: I realize that some of the ideas presented above are in the "horribly bad programming" class. Programs that do things like this should ALWAYS perform sanity checks on the system to make sure that the undocumented conditions that they expect do actually obtain. Possibly they should simply refuse to run on later OS versions than they were written for, or should insist on a command-line affirmation from the user that it is really OK; then the user would not get blown up that first time with the new OS, and could test the program at leisure to make sure it is actually compatible, before adding "COMPATIBLE=1.4" to the command line (note that this form allows the program to still die for 1.5, 2.0, whatever)]. Bela Lubkin * * // filbo@gorn.santa-cruz.ca.us CompuServe: 73047,1112 @ * * // ....ucbvax!ucscc!gorn!filbo ^^^-VERY slow [months] R Pentomino * \X/ Filbo @ Pyrzqxgl +408-476-4633 & XBBS +408-476-4945