Path: utzoo!attcan!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.windows.x Subject: Re: twm reactions Message-ID: <371@piring.cwi.nl> Date: 15 Jun 88 09:07:06 GMT References: <8806141942.AA29931@ATHENA.MIT.EDU> <10952@agate.BERKELEY.EDU> Reply-To: guido@cwi.nl (Guido van Rossum) Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 27 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