tag:blogger.com,1999:blog-7054543485166290590.post3755316326754010597..comments2021-09-06T08:09:19.625-07:00Comments on Serenity Leads to a Further Vision: The performance of a simple PV snapshot applicationD. Liuhttp://www.blogger.com/profile/12777478092719343060noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-7054543485166290590.post-40033544331253173992012-12-21T08:07:44.042-08:002012-12-21T08:07:44.042-08:00Interesting comparison between the various python ...Interesting comparison between the various python implementations and node. Recently I have been using the <a href="http://twistedmatrix.com/" rel="nofollow">Twisted</a> framework as part of the <a href="https://github.com/dylan171/ControlSystemWeb" rel="nofollow">Control System Web</a> project, so I was curious how pyepics+twisted would compare to other python implementations and node. I wrote an implementation of the <a href="https://github.com/dylan171/rsc/blob/master/snapshot/snapshot_pv_twisted.py" rel="nofollow">snapshot</a> program using these tools and compared it with the other implementations. The <a href="https://github.com/dylan171/rsc/blob/master/snapshot/dat/snapshot.png" rel="nofollow">results</a> are somewhat surprising as they are substantially better than the other python implementations, and slightly better then node. Of course the node and twisted implementations are much different, one is using the 'caget' application so must fork a new OS process for each PV and the other is using a native library loaded into the python application. It must also be noted that the twisted implementation could be considered incomplete as the PV connections are never explicitly disconnected before the application exits. If the 'pv.disconnect()' calls are naively added (see comments in source code) the running time nearly doubles! So some extra care would be needed to disconnect all PVs properly in a concurrent manner.Anonymoushttps://www.blogger.com/profile/05599409778417051597noreply@blogger.com