[comp.windows.x] twm reactions

DCOOPER%ESDSDF.DECnet@GE-CRD.ARPA (06/15/88)

I just started using TWM and like it, though I have two problems with it.

First, the pulldown menus are not as quick as desirable (on my sun 3).

	I tried compiling with the GNU C Compiler (1.22) to pick up some
	speed.  The compile was successful but none of the graphics
	(title bars borders, menus) would draw.  (Sounds like the same
	problem with GNU C which causes the server to die when highlighting
	a buttonbox.)

	My colleagues who use Sun 4s have no problems with the speed.


Second, TWM adds titlebars to the pulldown menus and dialog boxes which
	my toolkit applications pop up.

	The pulldown menus I use are from the menu widgets supplied
	in the contrib tape of X11R2 with bug fixes added.  These appear in
	TWM with titlebars and buttons.

	The dialog boxes I use are in a transientShellWidgetClass.
	The transient shell appears under TWM as an xterm does (outlined
	and blinking, while waiting to be placed).

Does anyone know how to get rid of these problems?



Dwight Cooper
GE Electronic Systems Dept.

rusty@velveeta.berkeley.edu (rusty wright) (06/15/88)

In article <8806141942.AA29931@ATHENA> DCOOPER%ESDSDF.DECnet@GE-CRD.ARPA writes:
>
>I just started using TWM and like it, though I have two problems with it.
>
>First, the pulldown menus are not as quick as desirable (on my sun 3).

What's the difference in speed like when you first click on a button
(in the background say) to get a pulldown menu, and then release the
button and then immediately press the button again?  I often find that
the first time I bring up a twm menu after having not done so for a
while that there is quite a delay, but if I immediately click on that
button again the menu comes up as fast as I could want.

I'm pretty sure that the reason it's so slow to bring up the menu the
first time when I haven't used it for a while is because I'm using a
sun 3/50 (only 4 megs of memory) and twm has simply either been swapped
out or most of its pages have been paged out and the delay is because
unix is paging or swapping it in.  (I modified xperfmon so that that it
also displays page out's; the line is flat only when I first come in
in the morning; the rest of the day it always has spikes, or spikes with
flat tops.)

--------------------------------------
	rusty c. wright
	rusty@cartan.berkeley.edu ucbvax!cartan!rusty

guido@cwi.nl (Guido van Rossum) (06/15/88)

In article <10952@agate.BERKELEY.EDU> rusty@velveeta.UUCP (rusty wright) writes:
>>First, the pulldown menus are not as quick as desirable (on my sun 3).
>[...]
>I'm pretty sure that the reason it's so slow to bring up the menu the
>first time when I haven't used it for a while is because I'm using a
>sun 3/50 (only 4 megs of memory) and twm has simply either been swapped
>out or most of its pages have been paged out and the delay is because
>unix is paging or swapping it in.

It may also be that the server is taking some time to map in umpteen
windows and send them all exposure events.  I believe one window takes
0.5K or 1K bytes in the server; a TWM menu with ten items would thus
take 6 or 12K.  Multiply this with the number of menus you have
(assuming TWM just maps/unmaps the window) and you get quite a bit of
memory devoted to menus in the server, which may also be paged out.
I suppose the 12 exposure events (and possibly also 12 map events?) also
take their toll.

I have written a toolkit with pull-down menus which takes a different
approach: the menu is a single window and I track button motion events
to detect when the pointer enters/leaves an item.  Highlighting feedback
is not slower than with other strategies, and the menus pop up much
faster, even though I never keep any unmapped windows; I just create and
destroy the menu's window as needed.  Anyone care to comment?
--
Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam
guido@piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl@uunet.uu.net