Path: utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!rutgers!ucsd!sdd.hp.com!hplabs!hpda!hpcuhb!hpcilzb!hpsciz!masa From: masa@hpsciz.HP.COM (Masayoshi Habu) Newsgroups: comp.windows.x.motif Subject: Re: SLOWWWWWWW Popups Message-ID: <13270002@hpsciz.HP.COM> Date: 26 Oct 90 18:25:22 GMT References: <1990Oct25.142436.9581@litwin.com> Organization: Hewlett-Packard, Santa Clara, CA Lines: 14 Creating a dialog with lots of children is a memory-intensive operation. There are two suggestions for slow dialog creation. One is to avoid creating dialogs as much as possible. This means that whenever it is possible to reuse a dialog, do it. You probably can create a dialog when your program starts up, and use just map/unmap calls. The other is to use a faster memory allocation library. The original C malloc() was designed to use less memory while sacrificing time. A fast malloc() library might be available on your system which uses more memory, but less time. Another reason to avoid creating dialogs (widgets) was that XtDestroyWidget() used to cause memory leaks which eventually eat up all your memory and kill a process. Motif 1.1 and new Xt library has fix for this. Masa Habu