Skip to content

Optimize allocate() vfunc of the icon grid

Spent a bit of time playing around with the gjs profiler a bit and hacking together sysprof marks for the shell (MR incoming). Turns out that while the trampolining between C and JS is slow, it's not the only thing slowing us down, and we can also do a lot better caching things instead of recalculating them on every frame.

Start out by optimizing vfunc_allocate() of the iconGrid, getting the average time spent in that function on my machine down from 2.3 ms to ... drum roll ... 0.7 ms.

Edited by Jonas Dreßler

Merge request reports