Hello:
We use Jidesoft's pivot grid in our application that maintains trading positions. In the code segment that does refresh of position screens - we are invoking PivotDataModel.calculate() followed by PivotTablePane.bothHeadersUpdated(). It is noticed that the call to bothHeadersUpdated( ) causes a big memory spike in the application - some times to the tune of 300 MB per real time trading position update.
This is impacting the performance of the application.
Can you please advice ?Is this the expected behavior ? Or can this be coded differently to not cause this huge albeit temporary spike in memory usage ?
Jide-version being used : 2.2.2.01
Code snippet below -
Thanks
public synchronized void refresh(boolean pForceRefresh) {
if (!(pForceRefresh || refreshFrame)) {
return;
}
final boolean isBlotterActive = this.positionBlotter.isActive();
if (!isBlotterActive) {
this.positionBlotter.setActive(true);
}
if (log.isTraceEnabled()) {
log.trace("Refreshing Pivot...");
}
if (pivotDataModel == null) {
throw new IllegalStateException("Pivot Data Model is null");
}
if (pivotTablePane == null) {
throw new IllegalStateException("Pivot Table Pane is null");
}
pivotDataModel.calculate();
pivotTablePane.bothHeadersUpdated();
if (log.isTraceEnabled()) {
log.trace("Pivot Refreshed");
}
this.positionBlotter.setActive(isBlotterActive);
}