Huge performance drop when masking multiple images in SKIA

I am experiencing a performance dropt to below 10fps when masking multiple images like so:

The images are approx. 600kB and FullHD. Masking a number of layers only containing shapes doesn’t produce the same performance drop.

I am not sure if this is still an issue but I remember some months ago introducing an IOBox like yours could cause perf drops in OpenCV patches.

Might be worth a try to get rid of the IOBox and see if that makes a difference.

Or move the IOBoxes out of the ForEach Region?

Not a bad guess, but the IOBoxes seem to have nothing to do with it. Also Drawing the images is totally fine and smooth. The problem only appears when using the mask.

can you mask after the Group (spectral)? it looks like it’s the same mask for all images.

btw: you don’t need the PerfMeter node, every skia Renderer has one built in. you can enable/disable it via CTRL+F2 when the Renderer has focus.

Masking after the Group(spectral) is even worse for some reason. (And I would actually need a different mask for each image, this is just for sake of demonstration).

It really looks much more like a bug, than a performance issue to me. As soon as the mask is connected, there seems to be something fishy going on in the graph.

btw: thank’s for the PerMeter hint :)
MaskBug.vl (21.9 KB)

Also as soon as I connect the mask, the tooltips up along the graph start flickering. The dot in front of the tool tip description does so, to be precise. My not so technical wild guess is that something in the Mask triggers some kind of refresh / reload.

After digging a bit, I noticed that “Mask” uses “Precompose” a lot. This node alone seems to trigger the same behaviour.

hi mburk,
I think it’s not really a bug, but an operation that just takes this amount of time.
It would be interesting if there is a way of doing some operations only once, caching a composed image and then use this later on.
By the way: the dot in the tooltip is just visualizing the frame rate

Hi and thanks for the info. Could be that it is just plain performance issues, but what speaks against it just being an expensive operation is, that it doesn’t reflect at all in the displayed timings of any of the involved nodes. Also the performance goes down in an absolutely non linear way. With a couple of images I get straight 60fps. One more and I’m down to below 10fps. All the images have similar sizes in that case.

sorrily only the “skia scene graph update” makes it into the timings. The renderers upstream call via Layer.Render, which traverses the graph later on doesn’t make it into the timings. I opened an issue for that.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.