Hi Alex, On 11/14/06, Alexander Gnauck <[EMAIL PROTECTED]> wrote:
Hi Vinod, > I've been trying out the libidn jar in a Java application. > Specifically, I'm using the stringprep and nameprep methods. > > When I profiled the application, the profiler reported that these two > methods were taking the max amount of cpu time. > > Is there anything that can be done to improve the performance? > Currently, 50% of the app's cpu usage is taken up by libidn. stringprep is a process which takes lots of CPU time. I try to avoid unnecessary stringprep calls whenever possible, use caching and other methods with reduce CPU load. On what kind of application are you working? 50% is quite a lot.
Currently there are no unnecessary calls to stringprep in the application. The actual problem stems from having to call StringBuffer.charAt() and StringBuffer.contains() so many times (millions of times in a few minutes during load). The app is an XMPP server, so it all adds up quite fast. Regards, Vinod. _______________________________________________ Help-libidn mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-libidn
