I just read this thread, as I to have found timestamp processing to be a
bottleneck and maybe there is nothing that can be done about it, without
going binary. However the firstNonDigit method could be optimized,
currently it uses isDigit, which does a lot more than checking if a
character is between 0 and 9 (Though I'm not sure if this would work for
all languages). Anyway I'm going to poke around and see if I can find a
way to bring the number down from 40% in my app.
> There is no simple go-faster change I know of. Then again I've not
> heard of any performance problems in this area before.
> If you do come up with some performance-improving changes, by all
> means post them to the list for integration into the official driver..
* 40.1% - 51,652 ms - 92,028 inv.
org.postgresql.jdbc2.TimestampUtils.toTimestamp
o 37.0% - 47,598 ms - 92,028 inv.
org.postgresql.jdbc2.TimestampUtils.loadCalendar
* 19.1% - 24,538 ms - 736,224 inv.
org.postgresql.jdbc2.TimestampUtils.firstNonDigit
Nicholas