| | | | Browse by category |
Question
What are the IlpNetwork-specific tips that I can use to improve performance?
Answer
Use the following tips:
- Disable time-consuming services during end-user interactions
When dragging objects, you can delay the layout or draw ghosts instead of fully opaque objects.
For example, to disable the layout temporarily, you can make the followingcall, let's say in your interactor:
//Prior to starting the changes
IlvManager.setContentsAdjusting(true);
...
//move, drag, some other operation
...
//After operation is done
IlvManager.setContentsAdjusting(false);You can also make use of:
IlvGraphLayout.setAutoLayout (boolean)
You can change how and when dragged objects are drawn by using the following
API:
IlvSelectInteractor.setOpaqueMove (boolean set)
IlvSelectInteractor.setXORGhost (boolean xorGhost) - Make use of the
start/endBatch()
methodsYou should make use of the
startBatch()
andendBatch()
methods of theIlpAbstractDataSource
class before and after making massive changes to theIlpObject
instances in the data source. This has proven to make computation almost 5 times faster in certain cases.IlpAbstractDataSource datasource = (IlpAbstractDataSource)network.getDataSource();
datasource.startBatch();
for (all network elements) {
networkElement = objects.next();
updateStatesAndAlarms(networkElement);
}
datasource.endBatch();