[pysnmp-users] Re: [Twisted-Python] Twisted and SNMP

Ilya Etingof ilya at glasnet.ru
Wed Feb 11 03:08:24 EST 2004

> > but if anyone is interested in bringing a full high performance ASN
> > coder-decoder to twisted, i'd be willing to help.
> Ilya (creator of PySNMP) just released a new version of PySNMP
> yesterday.  It's noticeably faster feeling than the 3.3.x version.  I
> don't have time to do timings with it, but I'd guess it's probably
> taking 3/4 of the time of the previous version.  Still likely not 0.02
> seconds on getbulk requests, but noticeably faster.

Just a little bit of clarification:

My ASN1 decoder is designed in a way similar to a top-down text parser --
it reads octet stream (text) and builds a tree of ASN1 objects (AST).
Depending of the mix-ins to those ASN1 objects, walking the tree may
produce something concrete.

Perhaps the most noticable bottleneck there lays in the fact that building
a tree of ASN1 objects involves massive classes instantiations. In the
latest pysnmp code (3.4.x) I attempted to save on object creation by caching
and reusing once created ASN1 objects.

To make the most of this trick I'd suggest to cache and re-use ASN1
objects (SNMP message objects for example) at your application whenever


More information about the Twisted-Python mailing list