[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2596.0. "Iconify window -> faster???" by FORTSC::KISHIMURA () Tue Apr 10 1990 18:40

Performance of an X-windows application...
------------------------------------------
I've developed a C application which calls various XLIB routines.  I create 2
windows (using X$CREATE_WINDOW), and 2 pixmaps (for backing store).  All text 
and graphics are written to the pixmaps, and the pixmaps are copied to the 
windows... Pretty basic stuff.

An Observation
--------------
My application draws graphs in window #2 using X$DRAW_LINE.  (Draw line in 
pixmap, copy pixmap to window, ...)

  a) If window #1 and window #2 are both exposed while I'm drawing my graph,
     it takes my application several minutes to draw the graph. 

  b) On the other hand, if window #1 is iconified and window #2 is exposed,
     the graph is drawn in a fraction of the time.

Question
--------
Can anyone explain what's happening here?  Why is the speed be so much 
faster when one of my windows is iconified?  What can be done to maintain the 
'faster speed' when BOTH windows are exposed?    
T.RTitleUserPersonal
Name
DateLines
2596.1Pixmaps are the problemDECWIN::FISHERPrune Juice: A Warrior's Drink!Wed Apr 11 1990 13:5621
You are probably running on a GPX and probably each pixmap is bigger than half
the screen.  The problem is that pixmaps have to be paged into the GPX's off-
screen memory to be written to.  If you are getting exposures and thus reading
from one pixmap, and are trying to write to the other at the "same" time, you
are probably thrashing like mad.  At the very least, the writing pixmap stays
in, but the reading pixmap is brought in a few lines at a time, which ties up
the server and keeps you from writing.

In other words, it is probably not the iconification per se, but the exposures
on the other window.

BTW, before you say "It can't be *that* slow"...yes it can.  The GPX is TERRIBLE
at getting data moved to and from virtual memory.

There is little you can do except to either cut down the size of your pixmaps
or try to use only one pixmap at a time.  It's a hardware limitation
unfortunately.  You should see it significantly better on a monochrome system
(which keeps all pixmaps in virtual memory) or on an SPX system (which has a
lot more offscreen memory and can pack it more efficiently).

Burns
2596.2Also true of the VAXstation 3100?FORTSC::KISHIMURAWed Apr 11 1990 14:3428
-------------------------------------------------------------------------
<You are probably running on a GPX and probably each pixmap is bigger>
<than half the screen.  The problem is that pixmaps have to be paged >
<into the GPX's off-screen memory to be written to.                  >

Yes and no.  Your assumption about my pixmpas is 100% correct.  I have two 
pixmaps, and each is larger than half the screen.  I'm not running on a GPX
though.  My application is running on a VAXstation 3100.  By chance, do you
know if this 'problem' also exists on the VAXstation 3100? 
-------------------------------------------------------------------------

<If you are getting exposures and thus reading from one pixmap, and are >
<trying to write to the other at the "same" time, you are probably      >
<thrashing like mad. At the very least, the writing pixmap stays in,    >
<but the reading pixmap is brought in a few lines at a time, which ties >
<up the server and keeps you from writing.                              >

From what I understand about exposure events, and when they occur, I
don't believe this is the case, but I may be wrong (I'll take a much 
closer look at it - Thanks).  The window I'm writing to is 'on top' of the
other, and the other window is just sitting there minding its own business. 
Wouldn't I have to be moving windows around (exposing pieces of the 'other'
window) for it to encounter exposures?  If I'm correct, and expsoures are 
not occuring, do you know of anything else that could be causing this strange 
behaviour?
-------------------------------------------------------------------------

P.S.  Thank-you for the info.  I appreciate it!
2596.3GPX is a graphics processor, not a VAX processorSTAR::VATNEPeter Vatne, VMS DevelopmentWed Apr 11 1990 14:516
The GPX is a graphics processor, which is independent of the VAX processor.
Most VAXstation 3100s come with a GPX.  For comparison, the SPX is a faster
graphics processor that can also be used with a VAXstation 3100.

The GPX has the same characteristics no matter which VAX processor it is
connected to.