IlpEquipment-specific tips that can be used to improve performance

Article ID: 2141
Last updated: 28 May, 2018
Article ID: 2141
Last updated: 28 May, 2018
Revision: 3
Views: 632
Posted: 18 Aug, 2003
by Dean J.
Updated: 28 May, 2018
by Gargani A.

Question

What are the IlpEquipment-specific tips that can be used 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 object.
    For example, to disable the layout temporarily, you can make the following call, let's say in your interactor:

    //Prior to starting the changes
    IlvManager.setContentsAdjusting(boolean);
    ...
    //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 startBatch/endBatch() methods

    When multiple changes occur in the structure of the model, it is more effective to store the changes in a buffer, thus postponing the internal processing of notification. In that case, you should make use of startBatch() and endBatch() methods of the IlpAbstractDataSource.

    // starts notification bufferization
    IlpDefaultDataSource datasource = (IlpDefaultDataSource)
    equipment.getDataSource();
    datasource.startBatch();
    datasource.addObject(newRoot1);
    datasource.addObject(newRoot2);
    datasource.addObject(newRoot3);
    // ends notification bufferization
    dataSource.endBatch();

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


Others in this category