From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3adfd1a81f573bb9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-23 10:27:07 PST Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!news1.digex.net!ois.com!ois.com!not-for-mail From: beckwb@ois.com (R. William Beckwith) Newsgroups: comp.lang.ada Subject: Re: Help: Ada/X binding performance Date: 23 Dec 1994 05:55:43 -0500 Organization: Objective Interface Systems, Inc. Message-ID: <3deabf$sk9@gamma.ois.com> References: <1994Dec22.114509.1@rapnet.sanders.lockheed.com> NNTP-Posting-Host: gamma.ois.com X-Newsreader: TIN [version 1.2 PL2] Date: 1994-12-23T05:55:43-05:00 List-Id: 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