Performance when drawing large graphics
-
In my plugin I'm trying to swap between different backgrounds with a sliding animation, and I've noticed the graphics performance seems slow compared to Kontakt.
Animating more than 6 UI-sized layers on top of each other, whether it's in separate panels or as calls within a single paint routine, reduces the performance enough to be noticeably laggy. Performance seems identical regardless of the current alpha and resolution of the source image.
Preemptively I'll add that in my plugin, I am not animating 6 layers on top of each other, more like 3, but that the performance is worse there than in my stripped down example, for reasons I haven't tracked down yet.
Are there any workarounds or tips for maximizing performance in this situation?
Here's what animating 1 layer looks like: 1layer.mkv
And here's 10 layers: 10layers.mkv
Meanwhile here's Kontakt happily drawing 24 moving overlapping semi-transparent images
-
@Simon How much RAM is the giant image using?
-
@d-healey Lots, it's giant! 27MB. I'll try with a physically smaller image too.
Edit: Ah wait I already did, I tried with the same image downscaled to 1/4 the resolution and performance was identical.
-
@Simon said in Performance when drawing large graphics:
Lots, it's giant! 27MB. I'll try with a physically smaller image too.
Is that the file size of the image or the raw bitmap size (the size it will take up in RAM)?
-
@d-healey bitmap
-
@Simon That's not that big. I don't know what the cause of the issue is, I don't use images very much in HISE so it could be you've run into some limitation.