home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / x / 16535 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  3.5 KB

  1. Path: sparky!uunet!mcsun!Germany.EU.net!Informatik.Uni-Dortmund.DE!tommy!klute
  2. From: klute@tommy.informatik.uni-dortmund.de (Rainer Klute)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Server modifications to minimise network traffic
  5. Date: 11 Sep 1992 07:30:08 GMT
  6. Organization: CS Department, Dortmund University, Germany
  7. Lines: 64
  8. Sender: klute@tommy (Rainer Klute)
  9. Distribution: world
  10. Message-ID: <18phu0INN70u@fbi-news.Informatik.Uni-Dortmund.DE>
  11. References: <1992Sep10.123551.5489@wg.estec.nl>
  12. NNTP-Posting-Host: tommy
  13.  
  14. In article <1992Sep10.123551.5489@wg.estec.nl>, chris@wg.estec.esa.nl
  15. (Milquetoast) writes:
  16. |> The scenario we have is a closed network with a number of X terminals
  17. |> or
  18. |> workstations used as X terminals, with custom applications being run on
  19. |> a
  20. |> number of fileservers. We need to be able to minimise network traffic.
  21. |> One
  22. |> way that has been suggested of doing this is to build the bitmaps into
  23. |> the
  24. |> server and then use calls to the server to update the screen, rather
  25. |> than
  26. |> having to transmit the bitmaps. There would only need to be a limited
  27. |> number
  28. |> of bitmaps and there are no restrictions on the amount of memory and
  29. |> cpu
  30. |> power we could use. So, my questions:
  31. |> 
  32. |> 1)    Is this technically possible?
  33. |> 2)    Is it desirable?
  34. |> 3)    Is there any documentation or books that would point me in the right
  35. |> direction, or do I have to go straight to the source?
  36. |> 3)    Are there other ways of minimising network traffic that we should
  37. |> also
  38. |> investigate?
  39.  
  40. You should take a look into The X Resource, Issue 3. It contains an
  41. interesting article about "Improving X Application Performance" by Chris D.
  42. Peterson and Sharon Chang. You will find there a lot of programming hints
  43. to speed up Xlib and Xt applications, focussed especially on minimizing
  44. network traffic.
  45.  
  46. There is one topic, however, that I missed in the article: "bitmaps" (as
  47. you call them) or pixel graphics in general. Transferring images over the
  48. network causes a lot of traffic and should be reduced as much as possible.
  49. My approach would be as follows:
  50.  
  51. 1. Draw the image on a window once, and use backing store if possible. This
  52. tells the server that it would be useful to keep the window's contents even
  53. if it is obscured. When it gets unobscured the server redraws the contents
  54. itself and does not send an expose event. The drawback of this approach is
  55. that your server might not maintain backing store at all, or might decide
  56. to give up your window's backing store at any time. So while backing store
  57. is useful in general, your client must be prepared to redraw the window's
  58. contents at any time.
  59.  
  60. 2. Instead of drawing to the window directly you could create a pixmap on
  61. the server and transfer the image to the pixmap. An expose event on the
  62. window could be answered by copying the pixmap's contents to the window
  63. then. This is an operation performed in the server - the network traffic is
  64. limited to the expose event and the request to copy from pixmap to window.
  65. The drawback is that large pixmaps take away a lot of server memory.
  66. Especially on X terminals you must be aware of the fact that the server
  67. might fail to allocate a pixmap. And even if it doesn't, the server's free
  68. memory is reduced, which may have a considerable impact on other clients.
  69.  
  70. Bottom line: Use as much of the server's capabilities as possible, but
  71. don't rely on them. Be always prepared to handle redraw yourself.
  72.  
  73. -- 
  74.   Dipl.-Inform. Rainer Klute      klute@irb.informatik.uni-dortmund.de
  75.   Univ. Dortmund, IRB
  76.   Postfach 500500         |)|/    Tel.: +49 231 755-4663
  77. D-W4600 Dortmund 50       |\|\    Fax : +49 231 755-2386
  78.