Hint: parseSql(...) in AbstractJdbc2Statement.java can be optimized performance-wise

From: rw2xg7h02(at)sneakemail(dot)com
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Hint: parseSql(...) in AbstractJdbc2Statement.java can be optimized performance-wise
Date: 2008-08-18 21:40:34
Message-ID: 8477-27086@sneakemail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

Just wanted to let you know, that the parseSql(...)-method can be optimized quite a bit by removing the many calls to p_sql.charAt and newsql.append. These could be replaced with local variables not requiring calls to be mutated (e.g. local char[]). I'm dealing with very long SQL-statements due to the use of Hibernate and parsing the SQL takes up quite some time - revealed by profiling tools.

Just wanted to let you know, if you at some point would like to optimize the performance of the JDBC driver.

Thanks for you work on PostgreSQL.

Regards,
A user of the JDBC-driver in production environment

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2008-08-18 21:58:38 Re: Hint: parseSql(...) in AbstractJdbc2Statement.java can be optimized performance-wise
Previous Message Albe Laurenz 2008-08-18 07:15:36 Re: Problem escaping, nonstandard use of \\ in a string literal