Opening sensors in visualisation takes ages and has memory issues

Description

When opening a sensor source with many sensors with a lot of measurements, opening the subtree with the measurements in the sensor tree takes ages. This began when someone added the feature to indicate empty sensors before opening the sensor. It seems as it the whole datasource is loaded into memory just to check whether it is empty.

Environment

Operating System: All
Platform: PC

Activity

Show:
User known
November 1, 2011, 8:08 AM

Indeed, the issue was that the complete file database was loaded into memory just to decide whether it is empty or not. I introduced a new List implementation in the middle which now directly accesses the file datasource API - now it opens again in not noticable time. Code is in SVN/Nightly.

User known
November 1, 2011, 6:29 AM

The initial programmer already knew this issue
From /de.uka.ipd.sdq.sensorframework.visualisation/src/de/uka/ipd/sdq/sensorframework/visualisation/views/TreeContentProvider.java, line 73:

for (Sensor s : sensors)
// FIXME a more efficient method to check if the sensor contains measurements should be used
objects[i++] = new TreeObject(s, treeObject.getDatasource(), experiment,
run, run.getMeasurementsOfSensor(s).getMeasurements().isEmpty());

Fixed

Assignee

Steffen Becker

Reporter

Steffen Becker

Labels

None

Requirement Category

None

External issue URL

Severity

major

Priority

P5

Status Whiteboard

None

External issue ID

780

Components

Affects versions

Priority