"retrotom" wrote:
Some quick questions before attempting to implement something:
Is there limit to the number of layers that can be used with roImageCanvas? If so, what is it?
From our testing the layer number seemed to be an arbitrary number used for z-index calculation. We testing with layers into the millions (not with images on every layer, obviously). It appears any limit to layers is imposed by the ram used, as each layer uses a different amount of memory based on the image added (from what we can tell).
Does performance scale with the number of layers used? I'm aware that this might depend on content (images/text used) -- so is it more efficient from a rendering perspective to group content in to a single layer or break it into many layers? Let's make the assumption that the image/text layers will need to be updated quickly based on user input.
Definitely. The more images in a canvas, the slower it seems to update. I believe it updates slower with more overlapping images as well (but that may depend on whether source or source_over was used). With complex enough compilations of images, there are techniques to mitigate this. Look at one of the threads about ImageCanvas performance (or just about any thread with ImageCanvas in the title). TheEndless, renojim, myself and others have put quite a bit of work into tweaking it to be performant, and it should be mostly documented in those threads.