comp.lang.ada
 help / color / mirror / Atom feed
From: beckwb@ois.com (R. William Beckwith)
Subject: Re: Help: Ada/X binding performance
Date: 23 Dec 1994 05:55:43 -0500
Date: 1994-12-23T05:55:43-05:00	[thread overview]
Message-ID: <3deabf$sk9@gamma.ois.com> (raw)
In-Reply-To: 1994Dec22.114509.1@rapnet.sanders.lockheed.com

gamache@rapnet.sanders.lockheed.com wrote:

: I need some help with regards to Ada bindings to X windows.  We have an 
: application that needs to do updates often.  I can't say exactly how often.
: I have access to the Ada W3 server and have seen the info there.
: My question is this, has anyone done any performance studies comparing
: Ada and non-Ada implementations?  Is there a linear curve for updating
: a given screen at 1 Hz, 5 Hz, 10 Hz, 20 Hz?

Ada isn't an issue here.  X is.  Whether you are using a C or an Ada
implementation of X is not as critical as the fundamentally asynchronous
client/server model of X.

My guess is that you are stressing mostly the X server.  Try running x11perf
and monitor the CPU time on both the X server and the X client (x11perf).
I just did this on my HP 715/33.  rlogin to the test system from another
display and run:

    xhost +
    setenv DISPLAY test:0.0
    x11perf -repeat 3 -all > perf.out &

I ran `top' to watch the CPU utilization.  The X server stayed between
90-98% and x11perf stayed between 1.5-8.5%.  You mileage may vary ...

Thus, I think you are focusing too heavily on the X client.  The client
is critical in that the client is telling the server what to do.  And
the way that you use the X server via X lib in your X application is
critical.  But, the language of the client isn't going to matter all
that much.  Not unless you have a _really_ slow client CPU and a really
fast X server CPU.

: Put another way, I'm asking if anyone knows, supported by data, whether or
: not Ada implementations can compete in real-time uses of X.  No other solutions
: are not an option.  No I didn't pick X.  Yes, I hope and expect that Ada can
: compete - just need some data to back this up.

I'll bet that with either Ada or C applications calling Ada or C implementations
of X lib you are not going to see more than a 10% variance either way.
Even if Ada was 10% slower (I don't think it is), you might only see
a 0.5% difference in overall performance.

So if I've succeeded in dispelling the language issue, I'll move on to
more relevant issues.  Here's a couple of suggestions:

    1.  be really smart about sending only the absolutely necessary
	X requests to the server (easy to say, hard to do).  Several
	architectures do this well.  Xt/Motif ain't one of them.

    2.  double buffer the graphics (draw to a pixmap and use XCopyArea
	to move the image to the window).  Double buffering not only
	looks smoother, it significantly decreases the draw time in
	server.

    3.  use multi-threaded Xlib in X11R6.  It will allow you to
	overlap what little client processing is involved in
	multiple threads.  This is where Ada can be a big win.

: To any vendors, please do NOT call, write, email or otherwise.  I'm not
: interested in marketing, I need hard data.

The hype you should be looking for is killer X server benchmark numbers.

: To everyone else,  thanks for any input (if any).

I am a vendor, but I hope I helped anyway.  ;-)

: PS. My turnaround time for this is short - the decision will be made the first
: week in January.

Good luck.

... Bill



  reply	other threads:[~1994-12-23 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-22 16:45 Help: Ada/X binding performance gamache
1994-12-23 10:55 ` R. William Beckwith [this message]
1994-12-23 11:14 ` R. William Beckwith
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox