home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.intrinsics
- Path: sparky!uunet!spool.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!purdue!yuma!csn!qwerty-gw.fsl.noaa.gov!eagle.fsl.noaa.gov!gregc
- From: gregc@eagle.fsl.noaa.gov (Greg Compestine)
- Subject: Re: Xt and CPU usage
- Message-ID: <gregc.725670457@eagle.fsl.noaa.gov>
- Sender: news@fsl.noaa.gov (USENET News System)
- Organization: Forecast Systems Lab, NOAA - Boulder CO, USA
- References: <1992Dec29.044957.19576@llyene.jpl.nasa.gov>
- Date: Tue, 29 Dec 1992 23:07:37 GMT
- Lines: 32
-
- john@pluto.Jpl.Nasa.Gov (John R Veregge) writes:
-
- >We have developed several large Motif applications that are complete CPU
- >hogs and I don't know why.
-
- >Each application has 300 to 500 XtCreateWidget() and 8 XtAppCreateShell()
- >calls. These calls are all made before XtAppMainLoop() is called. Widgets
- >are not destroyed until the application exits.
-
- >Each application is driven by both the GUI and serialized data using
- >XtInputCallbackProc's.
-
- >We run 2 to 4 application on a workstation.
-
- >2 applications will put CPU usage of a Sparc 2 at 97%, even when
- >completely idle with no serialized data input and no X events (GUI input),
- >using X11R4, on Sun Sparc 2's with 32+ megs of memory and 20+ megs of swap.
-
- >Can anyone tell me (1) Why? and (2) How can I fix (optimize) this?
-
- Since the performance on a Sparc 2 is "reasonable", you could greatly
- reduce the startup cost and runtime size of your app by only creating widgets
- and shells when needed. Unfortunately, this may mean a substantial rewrite of
- your application.
-
- As for your CPU being so busy, I have not a clue. First, are you
- sure your app is in XtAppMainLoop when usage is so high? How are you
- measuring usage? If you are running "ps", it may take some time (several
- minutes) before the usage numbers stabilize. Running a perfmeter may
- give you a little better feedback.
-
- Greg
-