[comp.windows.x] Confusing performance data about XNEWS and R4

tzeng@miro.Berkeley.EDU (Ping-San Tzeng) (02/23/90)

I found some confusing performance data about
the R4 server and OpenWindows 1.0 (XNEWS) on my SPARC-1 (No GX board).

For my own program that draws a lot vectors with "XDrawLines",
OpenWindows is about 3 times faster than the R4 server
to draw the complete picture on the screen.
(measured with a stop watch, not CPU time)

However, for "x11perf -line???" (??? is any legal number),
the results show that R4 server is about 50% faster than the OpenWindows.

Does anyone know why?


Ping-san.

keith@EXPO.LCS.MIT.EDU (Keith Packard) (02/24/90)

> I found some confusing performance data about
> the R4 server and OpenWindows 1.0 (XNEWS) on my SPARC-1 (No GX board).
> 
> For my own program that draws a lot vectors with "XDrawLines",
> OpenWindows is about 3 times faster than the R4 server
> to draw the complete picture on the screen.
> (measured with a stop watch, not CPU time)
> 
> However, for "x11perf -line???" (??? is any legal number),
> the results show that R4 server is about 50% faster than the OpenWindows.
> 
> Does anyone know why?

The R4 server was tuned to draw only copy-mode lines with a planemask of
all ones.  If your application uses some other raster op, or other planemask,
the performance of the R4 server will be abysmal.  Time constraints prevented
me from spending the week necessary to rewrite the line code for faster
non-copy mode lines.

Also, x11perf attempts to represent the "perfect" client.  The performance data
it generates are best case numbers.  In the case of XDrawLines, x11perf draws
hundreds of lines in each request.  The R4 server was extensively tuned to run
x11perf quickly which could possibly have impacted the performance for clients
which draw few objects at a time (I don't think this is the case, but I have
no performance data to support this position).

So, if you application drew more lines at a time you could expect the
performance of the R4 server to improve.

Given the wide disparity between the XNEWS server and the R4 server for your
application, I suspect the first cause is more likely than the second.

Keith Packard
MIT X Consortium

joel@decwrl.dec.com (Joel McCormack) (02/24/90)

The obvious conclusion would be that the R4 server performs some other
operation verrrry slowly, which eats up all of its advantage, or that
the way you draw lines is not precisely what x11perf measures.  What
rasterop are you using to paint the window?  In the released R4 server,
almost anything other than GXcopy (and sometimes GXxor) is quite slow. 
Also, any operation that requires a planemask that is not all 1's is
quite slow.

- Joel McCormack (decwrl!joel, joel@decwrl.dec.com)

tzeng@MIRO.BERKELEY.EDU (Ping-San Tzeng) (02/24/90)

My program use only copy-mode and a planemask of all ones.
On each call of XDrawLines, I draw about 4-20 lines.

By the way, I draw my picture in a XView window. Does this matter?
(Direct Xlib calls, not pw-ops)

Ping-san.

msm@src.dec.com (Mark S. Manasse) (02/24/90)

If I had to guess, I'd say that what you're seeing is the performance of
width 1 lines.  The X protocol distinguishes width 0 lines (which can be
rendered in an arbitrary way) from width 1 lines (which must satisfy
certain mathematical properties).  The R4 server handles width 1 lines
by using the general wide-line code.  The XNews server treats width 1
specially.  Some suspicions were raised at the X conference that the
resulting lines don't meet the specification, but I don't know for sure.

Mark

tzeng@miro.Berkeley.EDU (Ping-San Tzeng) (02/24/90)

In article <14643@jumbo.dec.com> msm@src.dec.com (Mark S. Manasse) writes:

=If I had to guess, I'd say that what you're seeing is the performance of
=width 1 lines. ........ The R4 server handles width 1 lines
=by using the general wide-line code.  The XNews server treats width 1
=specially.

YES. All lines are of width 1.  I think this is the answer.

Thanks!

Ping-san.