0 Replies Latest reply on Nov 15, 2006 3:58 PM by bq3

    Performance and Sprite objects

    bq3
      I've written an application in Flex 2 that consists of several accordions containing custom canvas objects, and it is having performance problems.

      I'm running the application within IE 6.0 under Windows 2000. The application loads an XML file and uses the data to create custom Sprite objects in the canvases. Each Sprite consists of two swf images that are loaded using the Loader class, a small rectangle created by using the Sprite graphics property, and a text label. In addition, each Sprite is connected to one or more other Sprites by a line drawn using the Sprite's graphics property. The Sprites have the capability for being dragged, and for being highlighted when clicked.

      My problem is performance; these Sprites perform slower than a similiar program that I wrote in ActionScript 2.0. From what I understand, Flex 2.0, ActionScript 3.0, Flash 9, and the new Sprite class are supposed to deliver greatly improved performance, but my new application seems worse than the old one under Flash 7 using MovieClips. The more Sprites on the screen, the worse the performance, and the lines seem to contribute to the degradation.

      There is way too much code involved to include in this message, so I'm looking for general info. Is there some basic point I am missing?

      The performance is also degraded when triggering instances of the Menu and Popup classes. When running the Task Manager during the application, I've noticed that both Memory Usage and GDI objects increase whenever I display a Menu or Popup. Both Memory Usage and GDI objects go up and down, but there is a steady increase in both metrics as I continue to use Menus and Popups. As far as I can tell, I am disposing of both types of objects properly, but it appears that their allocation is remaining in memory.