Improve the application performance

Article ID: 2183
Last updated: 29 May, 2018
Article ID: 2183
Last updated: 29 May, 2018
Revision: 3
Views: 807
Posted: 29 Dec, 2008
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How can I improve the performance of my application?

Answer

The user manual contains a couple of sections with performance considerations. Here are some hints to bear in mind when building your application:

  • use zoomable objects instead of non-zoomable whenever possible.
  • do not do long computations in IlvGraphic.draw/zoomable/applyTransform/boundingBox.

  • do not use Java2D features like antialiasing, or use them for some objects only (labels).
  • make sure IlvQuadtree.setOptimizeMode is set to true (the default value).
  • use setContentsAdjusting(true)....false for any large set of changes.
  • check that you do not add too many properties, or named properties to the graphic object. Instead, use one (or few) property object that stores the others.
  • make sure you do not install too many manager listeners.
  • when you have to perform costly operations on a ManagerContentChangedEvent or ManagerSelectionChangedEvent, and when (for instance) many objects are selected, series of events are usually sent to registered listeners. In such a case, try to perform your costly operation only when:
    • isAdjusting() returns false (ManagerContentChangedEvent object), 
    • isAdjusting() returns false or isAdjustmentEnd() returns true (ManagerSelectionChangedEvent object).
  • Try to group related graphic objects in one single object in order to reduce the number of objects stored in the manager (IlvGraphicSet), or custom (IlvGraphic class). For example, nodes with labels or other decorations underneath.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2183
Last updated: 29 May, 2018
Revision: 3
Views: 807
Posted: 29 Dec, 2008 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category