tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@apache.org>
Subject Re: svn commit: r1140204 - /tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
Date Mon, 27 Jun 2011 15:56:06 GMT
The javadocs say it can be an "expensive" operation. But considering the
alternatives [and this is only done once],  this seems to be reasonable.
What could be worrisome is the JDK does allow for more charsets to be added
at run-time. In which case - a user could be out of luck.

If we were scared of performance at startup .. we could always have a
System.properties of comma separated entries as the source of charset names
instead of worrying about Charset.availableCharsets(). In which case
"iso8859-1,utf-8" might be enough for some users.

-Tim


On Mon, Jun 27, 2011 at 11:49 AM, Konstantin Kolinko <knst.kolinko@gmail.com
> wrote:

> 2011/6/27  <markt@apache.org>:
> > Author: markt
> > Date: Mon Jun 27 15:19:22 2011
> > New Revision: 1140204
> >
> > URL: http://svn.apache.org/viewvc?rev=1140204&view=rev
> > Log:
> > Need to include aliases in charset cache
> >
> > Modified:
> >    tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
> >
> I was wondering how slow is Charset.availableCharsets().
> In my test it is about 100ms.  Nothing to worry about.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message