Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Improving list container and list widget performance

If performance problems occur when using list container or list widget, you may be able to improve performance using one or more of the following tips:

  • When using text:
    • Use bitmap fonts whenever possible.
    • If TrueType fonts are required, use Simple TrueType fonts instead of Complex TrueType fonts.
    • Avoid using the fontmapmodel for text in list items.
  • When using images:
    • Avoid unnecessary transparency in images.
    • Use small images whenever possible. Large images can slow down performance.
    • Avoid image scaling. Use tiled images instead.
    • If you are using tiled images, make sure the part of the image that is being tiled is large enough. Otherwise a lot of draws will be required to for each item, which can slow down performance.
  • When using list container:
    • If list flicks are slow, the Event Expiration Timer can be increased by calling IObserver_SetPointerEvtExpirationTimer(). A value closer to 350ms instead of the default 150ms may help.
    • Enabling placeholder support in list container can also improve the performance of list flicks.
    • To improve startup time and livescroll performance, enable asynchronous loading and balancing of items in the list container.
  • When using list widget:
    • If the application uses the list widget indexer function, or the item's model listener, these require a lot of work. Consider using list container instead to improve performance.
    • Do not create fonts within indexer or the item's model listener. Creates font when the list widget is created.
    • Try to avoid using LWF_VARIABLEITEMSIZE, if possible. Homogenous lists provide better performance.
  • Avoid using gradients such as PROP_GRADIENT_STYLE.
  • Avoid using the blend widget in list items.