[Date Prev][Date Next][Date Index]

ezcaIDL performance revisited





    Folks,

You will recall that there was some discussion a few months back regarding the
performance of ezcaIDL (my newer IDL channel access interface) compared to
Ben-Chin Cha's CaWave interface.  ezcaIDL was 3-5 times slower on many
platforms, but performed identically on Solaris.

I have now tracked down the problem to being one of an error in the ezca
library, which was in turn based upon incorrect documentation in the Channel
Access Reference Manual.  

It turns out that every call to the ezca library resulted in a call to
ca_pend_event(.00001), which was supposed to be a very quick 'poll' of channel
access to process any monitor callbacks.  In fact, 0.00001 seconds was above
the (undocumented) threshold of 1 microsecond, and in fact ca_pend_event was
not polling. On many systems (but not Solaris) it was waiting for 1 tick of
the system clock, which is 10 msec on Sun4 and SGI.

By replacing the call to ca_pend_event(.00001) with ca_pend_event(1.e-9) the
performance of ezcaIDL and CaWave are now identical.

____________________________________________________________
Mark Rivers                             (312) 702-2279 (office)
CARS                                    (312) 702-9951 (secretary)
Univ. of Chicago                        (312) 702-5454 (FAX)
5640 S. Ellis Ave.                      (708) 922-0499 (home)
Chicago, IL 60637                       rivers@cars3.uchicago.edu (Internet)