getCharsetNameForIndex() is slow
Posted by: RENAULT Frédéric
Date: June 01, 2012 05:03AM

Hello,

While profiling my application, I noticed that the function getCharsetNameForIndex() takes sometimes 5% of the execution time.

It can be less, but it can also be worse if there are many columns with a Charset in the answer. ( It's called for each column)

This function does a seek in a hasmap and two equalsIgnoreCase()

For me (and probably most of us), this function returns always the same value. ( "UTF-8" in my case)

Maybe the profiler is not really accurate, anyway I think this function takes too much time.

I've cached the last result and the execution time drop to 0%. ( It's a quick & dirty, not thread safe modification).

Do you think I have to open a bug report ( With performance severity) ?

Fred

Options: ReplyQuote


Subject
Written By
Posted
getCharsetNameForIndex() is slow
June 01, 2012 05:03AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.