Uploaded image for project: 'InsightEdge Platform'
  1. GS-13485

Improve memory allocation by pre-allocating ArrayList instances in the SQL execution engine

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 12.3.1
    • Labels:
      None
    • Platform:
      All
    • SalesForce Case ID:
      11718
    • Acceptance Test:
      manual
    • Sprint:
      12.3.1-M3
    • Product:
      XAP
    • Edition:
      Open Source

      Description

      High rate of memory allocation in com.j_spaces.jdbc.SelectQuery - Consider Pre-allocating ArrayList instances in affected methods of SelectQuery.

      com.j_spaces.jdbc.SelectQuery is responsible for many memory allocations which are unnecessary increasing GC activity. The attached screenshot shows relevant parts of statistics collected during 1-minute run. In 1 minite two methods in the class SelectQuery allocated together 400.70 MB + 264.92 MB. The allocations were done when adding objects to ArrayList instances.
      On 3rd place is the method com.j_spaces.jdbc.builder.QueryTemplatePacket.prepareForUnion() which allocated 17.54 MB in 1 minute. The source code looks complicated, I can't tell if it is possible to pre-allocate here an ArrayList as well.



        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: