[comp.windows.x] Why is plaid so cpu-intensive?

pjs@euclid.jpl.nasa.gov (Peter Scott) (10/25/90)

Question: what makes plaid so damn cpu-intensive?  For
something that just draws rectangles it sure puts a
hell of a load on a machine.  When I run it on vendor's
machines at expos they give me dirty looks when the
cursor gets stuck  :-)


-- 
This is news.  This is your       |    Peter Scott, NASA/JPL/Caltech
brain on news.  Any questions?    |    (pjs@euclid.jpl.nasa.gov)

cjmchale@swift.cs.tcd.ie (10/27/90)

In article <1990Oct24.225856.6840@elroy.jpl.nasa.gov>,
pjs@euclid.jpl.nasa.gov (Peter Scott) writes:
> Question: what makes plaid so damn cpu-intensive?  For
> something that just draws rectangles it sure puts a
> hell of a load on a machine.  When I run it on vendor's
> machines at expos they give me dirty looks when the
> cursor gets stuck  :-)

Plaid issues the XDrawrectangles() requests but doesn't do a sync() to
wait until the rectangles are drawn. Hence the queue of requests to be
handled by the X server gets filled up mostly with requests to draw
rectangles. If another request is sent to the X sever (from a
different application) then there might well be tons of
XDrawRectangles() requests in front of it. Basically, plaid sends
XDrawRectangles() requests faster than the server can keep up.
This is what causes the sluggish response that plaid is guilty for.

disclaimer: It's been a year since I looked at the source for plaid.
(And no, I didn't write it.)

Regards,
Ciaran.
-- 
Ciaran McHale		"An inappropiate joke for every occasion"
Department of Computer Science, Trinity College, Dublin 2, Ireland.
Telephone: +353-1-772941 ext 1538    FAX: +353-1-772204   Telex: 93782 TCD EI
email: cjmchale@cs.tcd.ie	or	cjmchale%cs.tcd.ie@cunyvm.cuny.edu
	My opinions are.

withrow@vino.enet.dec.com (Robert Withrow) (10/30/90)

>>Plaid issues the XDrawrectangles() requests but doesn't do a sync() to
>>wait until the rectangles are drawn. Hence the queue of requests to be
>>handled by the X server gets filled up mostly with requests to draw
>>rectangles. 

Which, incidentally, is what makes plaid so usefull for testing server
implementations:  It reallys test the flow control of your transport, and
how you deal with timesharing access between clients.

(Even if it is anti-social)