mirror of
https://github.com/servo/servo.git
synced 2025-06-12 18:34:39 +00:00
script: Measure stored layout data memory usage. (#36664)
We previously ignored the opaque layout data field inside each node when measuring a DOM node's memory usage. While some of the reachable memory was accounted for by measuring the layout's box tree, measuring it via the node ensures that we don't miss anything. Since there are often Arc values involved, this means that the layout-thread box tree measurements now look quite small, while reported JS heap usage has increased. Testing: Manually compared about:memory for servo.org. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
9dc56d420f
commit
878d595035
7 changed files with 34 additions and 14 deletions
|
@ -2439,8 +2439,6 @@ impl ScriptThread {
|
|||
|
||||
let mut reports = vec![];
|
||||
perform_memory_report(|ops| {
|
||||
let prefix = format!("url({urls})");
|
||||
reports.extend(self.get_cx().get_reports(prefix.clone(), ops));
|
||||
for (_, document) in documents.iter() {
|
||||
document
|
||||
.window()
|
||||
|
@ -2448,6 +2446,9 @@ impl ScriptThread {
|
|||
.collect_reports(&mut reports, ops);
|
||||
}
|
||||
|
||||
let prefix = format!("url({urls})");
|
||||
reports.extend(self.get_cx().get_reports(prefix.clone(), ops));
|
||||
|
||||
reports.push(self.image_cache.memory_report(&prefix, ops));
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue