Optimize layer traversal
I found when investigating traces with reported jank from P there was a large amount of time in handleMessageInvalidate but before latchBuffer. The only culprit here could be layer traversal itself. The current algorithm is quite costy requiring producing copies of sp, allocating a new vector, etc (see makeTraversalList). This CL optimizes the case where there are no relatives of the current layer. I found that this does in fact eliminate the new time in handleMessageInvalidate and also reduces onPreComposition. Bug:69852584 Test: Manual, comparison of systrace, relative Z still works. Change-Id: I2d942c1987087aae85decc0480d3622204ed665d
Loading
Please register or sign in to comment