Bug 188791 - [Linux] Cache the memory footprint and only update it after 1 second
Summary: [Linux] Cache the memory footprint and only update it after 1 second
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, InRadar
Depends on:
Blocks:
 
Reported: 2018-08-21 05:58 PDT by Carlos Garcia Campos
Modified: 2018-08-21 23:20 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.32 KB, patch)
2018-08-21 06:02 PDT, Carlos Garcia Campos
ysuzuki: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 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.
Comment 1 Carlos Garcia Campos 2018-08-21 06:02:18 PDT
Created attachment 347635 [details]
Patch
Comment 2 Yusuke Suzuki 2018-08-21 06:13:26 PDT
Comment on attachment 347635 [details]
Patch

r=me
Comment 3 Carlos Garcia Campos 2018-08-21 06:27:52 PDT
Committed r235113: <https://trac.webkit.org/changeset/235113>
Comment 4 Radar WebKit Bug Importer 2018-08-21 06:28:24 PDT
<rdar://problem/43558827>
Comment 5 Saam Barati 2018-08-21 19:47:45 PDT
1 second is a long time!
Comment 6 Carlos Garcia Campos 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.