Re: Some more profiling hotspots

From: till toenges <tt(at)kyon(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Some more profiling hotspots
Date: 2006-08-24 03:24:27
Message-ID: 44ED1BEB.8020705@kyon.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

j.random.programmer wrote:
> consistently get very high usage, via new string
> creation in the:
>
> org.postgresql.core.Encoding.decode
>
> method.

Doesn't look like like there is much room for optimization. The jvm may
spend a lot of time in this method because it is called often.

public String decode(byte[] encodedString, int offset, int length)
throws IOException
{
if (encoding == null)
return new String(encodedString, offset, length);

return new String(encodedString, offset, length, encoding); }

public String decode(byte[] encodedString) throws IOException
{
return decode(encodedString, 0, encodedString.length);
}

Till

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message j.random.programmer 2006-08-24 03:25:16 Re: Some more profiling hotspots
Previous Message Oliver Jowett 2006-08-24 03:06:09 Re: Some more profiling hotspots