Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!ucsd!ucbvax!westhawk.UUCP!thp From: thp@westhawk.UUCP ("Timothy H Panton.") Newsgroups: comp.windows.x.motif Subject: Re Motif Text Widget Performance Problems Message-ID: <9010121353.AA06483@westhawk.uucp> Date: 12 Oct 90 13:53:09 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 43 David Robbins writes: > With 50-100 text widgets on a form, the > thing takes much too long to put the form up on the screen First a disclaimer, I know nothing about the Motif Textwidget, when I encountered a similar set of problems we were using the HP widgets. But it sounds as if the problems are related. > Every text widget uses the same pixmap for a cursor. Not exactly, the colours can be different. I seem to recall that we ended up caching this pixmap where possible. (Fonts too ? I don't recall.) The Hp widgets never free'ed the pixmaps either, causing server growth. The basic problem as we saw it was that the Textedit widget is overspecified as a form entry component. A single line, 'fixed' length, single Source widget with many fewer translations would be nice. We ended up pruning Textedit 'till we came close to this, but more radical cuts might have been better. The (lowers voice) OpenLook spec has a field editor of just this kind, but AT+T's Xt+ implements it a full texedit widget in a manager, sigh. > create a set of text widgets ... > reuse them each time a form is displayed. Yeah, we did that, works well unless you get involved in geometry management. So we created one of each type of form (well nearly) at startup and then use them as required. > proceeds to send out a pile of X server requests! Well, we found that a faster server helped a great deal (R4 vs R3 say) Also don't forget the two essential widget speed hacks, a) get a good malloc() b) use XtManageChildren() rather than several calls to XtManageChild(). Hope that helped. Tim. +----------------------------------------------------------------------------+ |Tim Panton, Westhawk Ltd. "... avoiding vain and profane babblings." | |Phone: +44 928722574 -1 Timothy 6:20. | |uucp : ..!mcvax!ukc!westhawk!thp | |Paper: Westhawk Ltd. 26 Rydal Grove, Helsby, Cheshire, WA6 OET. UK. | +----------------------------------------------------------------------------+