[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

933.0. "Is reading an image slower than writing one?" by ACESPS::WALTON (Dave ) Tue Jun 13 1989 08:40

   I have a customer who is using XGetSubImage to read an image from a window
   to a pixmap to use as backing store.  He says that reading the image takes
   4 to 5 times longer than writing it.  He sees the same thing on GPX and 
   Firefox systems

   Does this sound correct or is something else going on?

   Thanks in advance.

T.RTitleUserPersonal
Name
DateLines
933.1What works for meSDSVAX::SWEENEYGotham City's Software ConsultantTue Jun 13 1989 09:389
    I'm not in a position to know from developing the server, I'm just a
    programmer, but it's always seemed to me that writing to a pixmap and
    then copying the pixmap to the screen was faster.  Reading the image
    from the screen back to the client is a very slow process.
    
    If the client writes to a pixmap in the first place then the pixmap
    becomes the backing store and pixels are not moving in the server =>
    client direction.

933.2VWSENG::KLEINSORGEToys 'R' UsTue Jun 13 1989 10:4611
    
    Pretty gross, and pretty unreliable.  How is the user making sure that
    the window hasn't been trashed in between the time he drew to it and
    the time he does the read?  Doing double writes to the pixmap and the
    window sounds a lot more reliable.
    
    One thing to remember about a read:  It's synchronous.  A image output
    isn't unless you force a synch.
    
    

933.3DECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Tue Jun 13 1989 12:5411
On top of everything else, I'm pretty sure that ReadSubimage is always
going to be a terrible performer.  Regular ReadImage would be better.
The reason is that XLIB has some very generic code to put the image from
the server into the image data structure.  As I recall, it does it one
pixel at a time.

But Fred et al are right...this is NO way to do backing store.  Write to
the pixmap and do copy area.

Burns

933.4Thanks, but . . .ACESPS::WALTONDave Wed Jun 14 1989 15:4217
    Re: .1 , .2 , .3

    Thanks for the quick and useful responses.

    I talked to the customer and he seemed to be satisfied with the info I
    passed on to him.  He will probably take some of the advice.   We
    realize that what he's doing is pretty shakey, but that's because the
    application is a non X application being ported to X and . . . Well,
    its a long story.  

    Anyway, I still have one question.  The customer seems to think it
    takes about ten times as long to read from a window than to write to
    it.  Is this because of the synchronization or is the code perhaps just
    more optimized for writing to a window.

    Thanks again. 

933.5DECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Mon Jun 19 1989 12:2311
Well, it is surely true that GetImage was and is not high on our list of
things to optimize in the server.  Therefore, I would not be surprised if
it were slower.  However, I could not say whether it would be 3 times slower
or not.

BTW, is the customer using ZMode or XY mode?  I suspect that Z mode would
be faster for GetImage on a GPX system.  There should be little
difference on a 1-bit monochrome system.

Burns