display.capture(): performance enhancer and possible bug

I just recently started using the display.capture() feature, and I actually found it useful for performance optimizations, and was wondering if the Corona folks thought my way of using display.capture() was appropriate, and if not, if there’s a better way to achieve what I need to do.

I have a scene that uses a lot of display objects, mostly text but some graphics intermingled as well. The text is dynamically generated, so I cannot pre-can the text as graphics. I found that with a lot of display objects, scrolling and panning the display, which extends way beyond the screen’s bounds, is sluggish (on an actual iOS device).

I’ve been able to reduce the number of display objects in the scene by logically grouping the display objects into sub-groups, then using display.capture() to turn each sub-group into a single display object. Roughly, my scene went from 150 display objects down to 30 display objects. And now panning and scrolling is very smooth on an actual iOS device.

There is one problem, however. When I perform the display.capture() calls in my scene:createScene() function, and I use storyboard.loadScene() to preload the scene before going to it, the display.capture()'s result in empty captures. Strangely though, it works fine on the Mac simulator, but on an actual iOS device, they are empty.

Two questions for the community:

  1. Is my use of display.capture() for performance improvement a good idea?
  2. Is my problem with display.capture() when using storyboard.loadScene() considered a bug? Seems odd that it works on Mac simulator but not on device.

I’m using build 786. [import]uid: 92621 topic_id: 25385 reply_id: 325385[/import]