Getting the memory footprint is an expensive operation in Linux. When called multiple times, the CPU usage is too much (see bug #188787). We could cache the result for at least 1 second to ensure we don't call it more than once per second.
Created attachment 347635 [details] Patch
Comment on attachment 347635 [details] Patch r=me
Committed r235113: <https://trac.webkit.org/changeset/235113>
<rdar://problem/43558827>
1 second is a long time!
I tried with lower values but cpu usage was still too much and tests were timing out. It seems RenderLayerCompositor::cacheAcceleratedCompositingFlags() is called too often.