Avoid expensive Throwable.fillInStackTrace call on each batch execution#3996
Avoid expensive Throwable.fillInStackTrace call on each batch execution#3996turbanoff wants to merge 1 commit intoh2database:masterfrom
Conversation
f43c5df to
22392e1
Compare
|
Thank you for your contribution! Did you run any actual tests with JMH? It looks like your code actually works slower in warmed up JVM. |
Before patch After patch As I can see there is clear speed up for small count of rows. For bigger count of rows performance change is within error boundaries. |
|
I tested another case when there were exceptions. I have an idea how to speed up both cases, but I need to test it. |
I think we are more interesting in case, when there are no exceptions. It's what usually happen during normal application execution. |
|
Your fix is good enough for original problem with performance, but there is another one and its solution requires reimplementation of the whole batch execution. |
|
Superseded by #3997. Thank you again for pointing this out! |
When I profiled my application, I noticed suspicious calls to
Throwable.fillInStackTrace.I propose to use
ArrayListinstead ofSQLExceptionas storage for batch exceptions.