From: jp107@cus.cam.ac.uk (Jon Peatfield)
Newsgroups: comp.sys.hp
Subject: X11R5 server SLOW, on 705 with GRX + xterm bug
Date: 14 Sep 92 23:42:42 GMT
Distribution: comp
Organization: U of Cambridge, England

I've just built the X11R5 (patchlevel 17) server on an HP705, using
the HP server bits that were recently announced, and compiling with
the unbundled cc (since I don't yet fully trust gcc-2.2.2 on the HP.)
I have a few problems with it, like it core dumps when I quit by any
method I've tried and won't reset the screen back to text mode... but
my major concern is just how slow it is.  Moving windows is so slow
that I can see it drawing in the background -- even my aging
SparcStation-1 (but mono screen -- bwtwo hardware in fact), looks fast
by comparison.  I've run some comparison tests with the x11perf
comparing it to the X11R4 server that HP ship with the 705, and the
difference is quite enlightening.

With things to do with data structure access and the like, the R5
server is slightly faster, but any access to the screen and it slows
down by up to a factor of 64, the best (or worst if you prefer)
example being for 500x500 stippled rectangle fill:

   HP-R4     MIT-R5   ratio    Operation
243000.0   390000.0 (  1.60)   Dot
 41800.0    48700.0 (  1.17)   1x1 161x145 stippled rectangle
 33600.0     8000.0 (  0.24)   10x10 161x145 stippled rectangle
  4950.0      138.0 ( 0.028)   100x100 161x145 stippled rectangle
   364.0        5.8 ( 0.016)   500x500 161x145 stippled rectangle
 38700.0    44100.0 (  1.14)   1x1 161x145 tiled rectangle
 25100.0     9530.0 (  0.38)   10x10 161x145 tiled rectangle
  1610.0      431.0 (  0.27)   100x100 161x145 tiled rectangle
    85.7       21.8 (  0.25)   500x500 161x145 tiled rectangle
 54100.0    88800.0 (  1.64)   X protocol NoOperation 
   439.0      682.0 (  1.55)   GetAtomName 
   436.0      648.0 (  1.49)   GetProperty 
 10700.0    12000.0 (  1.12)   Change graphics context 

Now I've seen things like this before when comparing accelerated
Xservers against unaccelerated Xservers, so I'm starting to think that
maybe the GRX has an accelerator, which the HP server makes use of,
but the sample Ngle code doesn't.  Can anyone confirm or deny this?

Does anyone have enough info about the Ngle hardware (specifically the
S9000_ID_A1439A, since that is what the GRX and CRX are), to write the
ddx server code which will be able to make use of it?  I'm prepared to
do some hacking in the source, and once knew something about graphics
systems, but havn't hacked the Xserver code before.  Can anyone with
more experience help me?


Now for something slightly related.

Has anyone else tried compiling the rest of the X11R5 distribution?
If so you will probably have found that the clients/xterm won't
compile.  At least it doesn't on my systems.  The problem is the use
of _file in line 1059 of clients/xterm/main.c.  Looking at the code it
should all be inside the #ifdef DEBUG there anyway, but the use of
_file doesn't work on HP-UX (8.07 anyway), since there is no _file
field of the FILE struct.  I altered this to use __fileL and __fileH,
which is just as bad.  *Why the hell is xterm so hacky?*

Here is my diff:
1049a1050
> #endif	/* DEBUG */
1058,1061d1058
< #ifdef hpux
< 		stderr->__fileL = i %% 256 ;
< 		stderr->__fileH = i / 256 ;
< #else   /* hpux */
1063d1059
< #endif  /* hpux */
1072d1067
< #endif	/* DEBUG */

The xterm compiled this way seems to work, but I make no promises...

-- Jon
--
Jon Peatfield, Computer Officer, the DAMTP, University of Cambridge
Telephone: (+44 223) 33-7852     Mail: J.S.Peatfield@amtp.cam.ac.uk

I'm an international arms dealer.  You can be one too.  Ask me how!