We're updating the issue view to help you get more done. 

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

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.

Workaround

None

Acceptance Test

manual

Status

Assignee

rotem herzberg

Reporter

Ester Atzmon

Labels

None

Priority

Medium

SalesForce Case ID

11718

Fix versions

Commitment Version/s

None

Due date

None

Product

XAP

Edition

Open Source

Platform

All

Sprint

None