[SNMP4J] Performance hotspot in Cipher.getInstance() method call

Frank Fock fock at agentpp.com
Sun Jun 2 23:29:14 CEST 2013


Hi Praveen,

SNMP4J is not caching the cipher object. Apparently, the performance 
overhead
of retrieving a Cipher instance is not that great with newer Java versions.
Nevertheless, I am currently working on a caching solution, which does not
introduce a new bootleneek for multi-threaded usage for SNMP4J 2.x.

If it will possible, I will also provide a backport to the 1.x branch.

Best regards,
Frank


Am 30.05.2013 13:03, schrieb Praveen Jain:
> We are using SNMP4J version 1.11.4 for a legacy application running in Java
> 1.4 environment. The application behaved slower than expected and profiling
> showed that there is hotspot in PrivDES.encrypt() method. This method in
> turn calls javax.crypto.Cipher.getInstance(String) method (apparently on
> each message transmission) and Cipher.getInstance(String) is the expensive
> and CPU intensive call. Can you please suggest if:
>
> 1.       This might be due wrong way of calling SNMP4J api (and also point
> to a reference code for correct usage to prevent this problem)
>
> 2.       Is this an inherent problem with Java 1.4 code?
>
> 3.       Is this a problem with SNMP 1.11.4 code (it is not caching the
> obtained cipher object)?
>
> Thanks in advance for the help.
>
>   
>
> -Praveen
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231




More information about the SNMP4J mailing list