home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / intrinsi / 690 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.8 KB  |  44 lines

  1. Newsgroups: comp.windows.x.intrinsics
  2. 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
  3. From: gregc@eagle.fsl.noaa.gov (Greg Compestine)
  4. Subject: Re: Xt and CPU usage
  5. Message-ID: <gregc.725670457@eagle.fsl.noaa.gov>
  6. Sender: news@fsl.noaa.gov (USENET News System)
  7. Organization: Forecast Systems Lab, NOAA - Boulder CO, USA
  8. References: <1992Dec29.044957.19576@llyene.jpl.nasa.gov>
  9. Date: Tue, 29 Dec 1992 23:07:37 GMT
  10. Lines: 32
  11.  
  12. john@pluto.Jpl.Nasa.Gov (John R Veregge) writes:
  13.  
  14. >We have developed several large Motif applications that are complete CPU
  15. >hogs and I don't know why.
  16.  
  17. >Each application has 300 to 500 XtCreateWidget() and 8 XtAppCreateShell()
  18. >calls. These calls are all made before XtAppMainLoop() is called. Widgets
  19. >are not destroyed until the application exits.
  20.  
  21. >Each application is driven by both the GUI and serialized data using
  22. >XtInputCallbackProc's.
  23.  
  24. >We run 2 to 4 application on a workstation.
  25.  
  26. >2 applications will put CPU usage of a Sparc 2 at 97%, even when
  27. >completely idle with no serialized data input and no X events (GUI input),
  28. >using X11R4, on Sun Sparc 2's with 32+ megs of memory and 20+ megs of swap.
  29.  
  30. >Can anyone tell me (1) Why? and (2) How can I fix (optimize) this?
  31.  
  32.     Since the performance on a Sparc 2 is "reasonable", you could greatly
  33. reduce the startup cost and runtime size of your app by only creating widgets 
  34. and shells when needed.  Unfortunately, this may mean a substantial rewrite of 
  35. your application.
  36.  
  37.    As for your CPU being so busy, I have not a clue.  First, are you
  38. sure your app is in XtAppMainLoop when usage is so high?  How are you
  39. measuring usage?  If you are running "ps", it may take some time (several
  40. minutes) before the usage numbers stabilize.  Running a perfmeter may
  41. give you a little better feedback.
  42.  
  43. Greg
  44.