Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Done
-
2.5.4
-
None
-
JDK 11, Linux, EKS Container
Description
In our prod application, when high traffic came in with heavy SQL queries, we observed high GC activities and from JFR profiling we found high heap usage was from Calendar Init called by org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.TextRowProtocol#getInternalTimestamp
Checked code, we called Calendar.getInstance() every time if no userCalendar specified, the cost is very heavy for a large result set, the question is why do we need to use a new Calendar instance each time, is it possible to reuse a Calendar instance for a default timeZone.