Scrolling Large Bitmaps

I am working on an image gallery that has to scroll very large images, on the scale of about 2500 X 2500 pixels. Now in this gallery I have to be able to show a scaled down view (to fit the stage), and a regularly scaled version (which scrolls with the mouse).

The problem is that this gallery is very sluggish and I need it to be much faster. Right now I have the following structure for the image display:

  • ScrollingImageDisplay (main display object for this system, manages scroll movement)
    • ConstrainedImageDisplay (manages sizing image appropriately for scaled or raw size)
      • Bitmap (displays the BitmapData for a very large image)

I have already tried to use some optimizations for speed:

  • I only update position/size information on a RENDER event
  • I use a scrollRect on the ScrollingImageDisplay so that it only renders in the area visible on stage

Some issues that might be related to the problem

  • I need to tween the scrolling of these images, but I’m thinking that perhaps TweenLite is slowing down the scrolling because when I move the image directly with the mouse (no animated scrolling), the image updates quicker and with less jerkiness
  • I am updating based on MouseEvents, I don’t know how often MouseEvents fire, so I’m wondering if I should just create an ENTER_FRAME event handler that calculates mouse position once per frame…

Anyway if you know anything that can help, I’d appreciate it. I don’t know enough about the speeds of actual BitmapData operations to think of a solution involving manipulation of that data. There might be an optimization using the copyPixels() method, but in my experience copying BitmapData information is much slower than doing just about any operation on a Bitmap. Also, I don’t really know how to use the Bitmap.scroll() or BitmapData.scroll() methods, I suppose there could be an answer there, but I’m not sure if using those methods would provide me any extra benefit over the scrollRect I’m already using…

Any clarification of these points would help. Thanks.