Tips to improve performance on IlpNetwork

Article ID: 2132
Last updated: 28 May, 2018
Article ID: 2132
Last updated: 28 May, 2018
Revision: 3
Views: 620
Posted: 31 Dec, 2003
by Dean J.
Updated: 28 May, 2018
by Gargani A.

Question

What are the IlpNetwork-specific tips that I can use to improve performance?

Answer

Use the following tips:

  1. 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)

  2. Make use of the start/endBatch() methods

    You should make use of the

    startBatch() and endBatch() methods of the IlpAbstractDataSource class before and after making massive changes to the IlpObject 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();

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2132
Last updated: 28 May, 2018
Revision: 3
Views: 620
Posted: 31 Dec, 2003 by Dean J.
Updated: 28 May, 2018 by Gargani A.
Also listed in


Others in this category