help-libidn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance


From: Vinod Panicker
Subject: Re: Performance
Date: Tue, 14 Nov 2006 14:35:51 +0530

Hi Alex,

On 11/14/06, Alexander Gnauck <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]