This is a follow up of the observations in D8033.
Purging of KisOpenGLUpdateInfos in KisTextureTileInfoPoolSingleSize seems to happen very often on my system. I'm not sure if this is something specific I only observe here. What seems to happen is that the queue gets completely empty, gets purged, only then to be reallocated. This happens 10+ times per second (see test plan below).
I can see this in the profiling as well (originally observed in D8033):
Here, the KisOpenGLUpdateInfo destructor alone takes 13% inside the main thread (namely 4.3% of the 33.0% of the main thread).
With this patch, the profiling impact of the KisOpenGLUpdateInfo destructor drops to < 1% (0.3% of 33.7%).
I found it quite difficult to get out of the multithread context into a safe main thread QTimer thing. Maybe there's a simpler way than what I came up with?