[comp.sys.amiga.tech] gimmezerozero

dwl10@uts.amdahl.com (Dave Lowrey) (03/08/90)

The following quote is from the RKM: Libraries & Devices .......
"The Gimmezerozero window uses more RAM than other window types, and
degrades performance in the moving and sizing of windows. There can be a
noticeable performance lag, especially when several Gimmezerozero
windows are open at the same time."

My question.... How bad is the "performance degredation".

I get the distinct impression that "Real programmers don't use
Gimmezerozero windows!".

-- 
"This ain't Rock 'N Roll, |  These be my words, not my employer's!
 this is Genocide!"       |Dave Lowrey - Amdahl Corp. - Houston, TX
 David Bowie -            |In Texas:  {moray,uhnix1}!starsoft!david
"Daimond Dogs"            |The World: dwl10@uts.amdahl.com (amdahl!dwl10)

navas@cory.Berkeley.EDU (David C. Navas) (03/08/90)

In article <6fw=02eZ8fOn01@amdahl.uts.amdahl.com> dwl10@uts.amdahl.com (Dave Lowrey) writes:
>My question.... How bad is the "performance degredation [of gimmezerozero windows]".

It's gross, really gross.  It is *quite* noticeable, please *don't* use them.
 
>I get the distinct impression that "Real programmers don't use
>Gimmezerozero windows!".

Hmm, depends on who is classified as *real programmers*.
:)
> this is Genocide!"       |Dave Lowrey - Amdahl Corp. - Houston, TX


David Navas                                   navas@cory.berkeley.edu
"Think you can, think you can't -- either way it's true."  Henry Ford

new@udel.edu (Darren New) (03/08/90)

In article <22751@pasteur.Berkeley.EDU> navas@cory.Berkeley.EDU.UUCP (David C. Navas) writes:
>In article <6fw=02eZ8fOn01@amdahl.uts.amdahl.com> dwl10@uts.amdahl.com (Dave Lowrey) writes:
>>My question.... How bad is the "performance degredation [of gimmezerozero windows]".
>It's gross, really gross.  It is *quite* noticeable, please *don't* use them.

Is it bad for other screens also?  That is, if I open my own screen and then
open a couple of GZZ windows on it, I'll only impact my own screen when
moving my own windows, right?  The Workbench screen won't slow down,
will it?      -- Darren

peter@cbmvax.commodore.com (Peter Cherna) (03/09/90)

In article <6fw=02eZ8fOn01@amdahl.uts.amdahl.com> dwl10@uts.amdahl.com (Dave Lowrey) writes:
>The following quote is from the RKM: Libraries & Devices .......
>"The Gimmezerozero window uses more RAM than other window types, and
>degrades performance in the moving and sizing of windows. There can be a
>noticeable performance lag, especially when several Gimmezerozero
>windows are open at the same time."
>
>My question.... How bad is the "performance degredation".

Pretty bad.  Fire up AmigaBASIC sometime and check it out.

Basically, what happens is that under the concept of windows there is
a concept of layers.  Very crudely speaking, a window is a layer with
borders and system gadgets added.  The gadgets are ways to control the
layer, like move it, size it, depth arrange it, etc.

Now all clipping is done to layer boundaries.  Notice that you can render
pretty carelessly and you'll never go outside of your own window (unless
that was your goal).  However you can trash your own window borders, since
they're in the same layer as your rendering.

GimmeZeroZero windows were a way around that, and what they do is give
you two layers for your window, the regular layer that is the size of the
window (into which window borders and border gadgets get rendered) and
an inner layer that is smaller on all sides by the border thickness.
When you render into the inner layer, there are two benefits:
	You can't trash your own borders.
	The upper left of your usable area is (0,0) (hence the name).

The extra layer that this generates makes the system slow down.

The two benefits can be obtained in standard ways.  You can always
look at your window->BorderTop and window->BorderLeft, and use those
as the origin of your rendering (instead of (0,0)).  The clipping
can be handled using InstallClipRegion() from graphics.library.

>I get the distinct impression that "Real programmers don't use
>Gimmezerozero windows!".

Not any more they don't.

>-- 
> this is Genocide!"       |Dave Lowrey - Amdahl Corp. - Houston, TX

     Peter
--
     Peter Cherna, Software Engineer, Commodore-Amiga, Inc.
     {uunet|rutgers}!cbmvax!peter    peter@cbmvax.cbm.commodore.com
My opinions do not necessarily represent the opinions of my employer.

navas@cory.Berkeley.EDU (David C. Navas) (03/11/90)

In article <13214@nigel.udel.EDU> new@udel.edu (Darren New) writes:
>Is it bad for other screens also?  That is, if I open my own screen and then
>open a couple of GZZ windows on it, I'll only impact my own screen when
>moving my own windows, right?  The Workbench screen won't slow down,
>will it?      -- Darren

All correct.  Please still don't use them, use InstallClipRegion() instead [or whatever
that is].  Mail me for an example, and I'll dig up one for you -- if you need one.

Yeuch -- it's like opening five windows at once!  Ridiculous!

David Navas                                   navas@cory.berkeley.edu
"Think you can, think you can't -- either way it's true."  Henry Ford