[pgjdbc/pgjdbc] 177f63: perf: improve performance of replacing JDBC {...} ...

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] 177f63: perf: improve performance of replacing JDBC {...} ...
Date: 2018-06-29 20:25:19
Message-ID: 5b3695af7c450_65162af18a57fc142477@hookshot-fe-6e9b612.cp1-iad.github.net.mail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 177f63be788a80529bfa7c2234cfabb039cc29b4
https://github.com/pgjdbc/pgjdbc/commit/177f63be788a80529bfa7c2234cfabb039cc29b4
Author: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Date: 2018-06-29 (Fri, 29 Jun 2018)

Changed paths:
M pgjdbc/src/main/java/org/postgresql/core/Parser.java
M pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions.java
A pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/StatementTest.java

Log Message:
-----------
perf: improve performance of replacing JDBC {...} escapes (#1230)

There are the key improvements:
1) Function arguments for {fn ...} were parsed twice
2) EscapedFunctions now appends data to existing StringBuilder instead of producing intermediate Strings
3) EscapedFunctions.getFunction avoids string concatenation (suggested by benbenw) and toLowerCase on a hot path

closes #1229

**NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

Functionality will be removed from GitHub.com on January 31st, 2019.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2018-06-30 06:47:30 [pgjdbc/pgjdbc] 701892: docs: use union merge strategy for CHANGELOG
Previous Message Vladimir Sitnikov 2018-06-29 20:21:05 [pgjdbc/pgjdbc] f46c86: perf: avoid BaseQueryKey.toString in CachedQuery.g...