Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1224

[Performance]High Heap Consumed by Repeated Calendar Init in org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.TextRowProtocol#getInternalTimestamp

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 2.5.4
    • 3.4.0
    • performance
    • 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.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            lsc1943 Jack Ling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.