I found this while profiling and KisPaintLayer::icon with a small but astonishing 0.1%:
It turns out, about once to twice per second, Krita really does re-render the SVG for its layer paint icons:
This seems to be the only icon that is reloaded periodically in this way, so first I thought the best fix might be to preload the QIcon into the paintlayer's private struct.
On further thinking though, a more general caching seems nicer as more code might be affected in other places. Also, caching inside KisIconUtils also works when switching themes, as the library seems to get reloaded when themes are switched (and thus the static vars cleared, at least that's what I see); this would add ugly code if caching the QIcon inside the paint layer. So I vote for having a general caching here and solving all icon caching issues there.