Bug 188791

Summary: [Linux] Cache the memory footprint and only update it after 1 second
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, bugs-noreply, cdumez, cmarcelo, dbates, ews-watchlist, saam, webkit-bug-importer, ysuzuki, zan
Priority: P2 Keywords: Gtk, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=188787
Attachments:
Description Flags
Patch ysuzuki: review+

Carlos Garcia Campos
Reported 2018-08-21 05:58:32 PDT
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.
Attachments
Patch (2.32 KB, patch)
2018-08-21 06:02 PDT, Carlos Garcia Campos
ysuzuki: review+
Carlos Garcia Campos
Comment 1 2018-08-21 06:02:18 PDT
Yusuke Suzuki
Comment 2 2018-08-21 06:13:26 PDT
Comment on attachment 347635 [details] Patch r=me
Carlos Garcia Campos
Comment 3 2018-08-21 06:27:52 PDT
Radar WebKit Bug Importer
Comment 4 2018-08-21 06:28:24 PDT
Saam Barati
Comment 5 2018-08-21 19:47:45 PDT
1 second is a long time!
Carlos Garcia Campos
Comment 6 2018-08-21 23:20:19 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.