Re: Some more profiling hotspots - Mailing list pgsql-jdbc

From till toenges
Subject Re: Some more profiling hotspots
Date
Msg-id 44ED1BEB.8020705@kyon.de
Whole thread Raw
In response to Re: Some more profiling hotspots  ("j.random.programmer" <javadesigner@yahoo.com>)
List 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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Some more profiling hotspots
Next
From: "j.random.programmer"
Date:
Subject: Re: Some more profiling hotspots