applyMask greedy as hell!
-
I have an UI that is not so much busy but still has quite advanced drawings (no images, all vectors)
It's laggy as hell, so I naturally decided to track this down with the profiler.
Following the result, it feels like it's a general overload and nothing in particular is taking a big amount of the CPU.Still, I tried to comment out some known greedy methods, and then I discovered this tiny thing
g.beginLayer(true); g.applyMask(gridPath, this.getLocalBounds(0.0), true); g.endLayer();was causing all the fuss despite being almost insignificant in the profiler!
see the result with the mask, then without, almost x14 improvement!
WITH MASK

WITHOUT MASK

So either the profiler is not able to effectively catch the bottleneck or I don't understand how to read it (which might be the case in the end...)