Don't constantly clear child node list on ChildrenUpdateMask
This is pretty inefficient. We can do a better job with some effort,
incrementally. This should help cases like list panning quite a bit.
To accomplish this, we split the child update into two phases. First, we build a
list of desired nodes (this step is necessary for clarity's sake, thanks to the
need to insert an arbitrary painter node).
Second, we make sure that the current reality matches the desired state by
adding & removing nodes as necessary: no more full rebuild each time.
On extremetable, with logging on the ChildrenUpdateMask handling if time taken
was > 0ms, the time taken for me (on a recent rMBP) went from regularly hitting
7-10ms per frame to _occasionally_ (~5 times in a few seconds of panning)
spiking above 0, usually only hitting 1ms, and twice hitting 3 and 4ms.
Task-number: QTBUG-34255
Change-Id: I9fb4fb4cf39ffff3b8035f0d6de3bd7da6fcc51c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>