lextm/sharpsnmplib — pull request #2 by nickolaykon (2013-05-09 22:49:33+00:00)
Title: SnmpV3 Performance improvements

Snmpv3 calls take upwards of 80ms. Function `PasswordToKey' takes the most amount of time, this change caches the value that `PasswordToKey` generates cutting down SnmpV3 call to about 3.5ms for both Sha and Md5 providers. I pieced together Caching structure (from Dictionary and Queue) that would remove old elements but still have close to constant look up time (It performed a lot better than OrderedDictionary which could have been used for the same task). The amount of elements in the cache is currently hard-coded as a constant of 100. As part of the testing I left snmp manager to query the agent non stop for a few days and the caching did not introduce any new issues, I have tested most of the synchronous calls and some async calls using these improvements.