diff options
author | Cameron McCormack <cam@mcc.id.au> | 2016-11-17 16:24:58 +0800 |
---|---|---|
committer | Cameron McCormack <cam@mcc.id.au> | 2016-11-18 17:12:33 +0800 |
commit | 4e52bb49b9fc7850cf75c5af8950538b14b856bc (patch) | |
tree | 08571434c918bd1ab75d6730e7544695acede9fa /components/layout_thread/lib.rs | |
parent | 181208a4e4be641fc18f54b06128265a27a80c46 (diff) | |
download | servo-4e52bb49b9fc7850cf75c5af8950538b14b856bc.tar.gz servo-4e52bb49b9fc7850cf75c5af8950538b14b856bc.zip |
GC the rule tree only when the free list gets to a certain size.
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 1d0ba9728cb..add38e67dc3 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1180,11 +1180,8 @@ impl LayoutThread { shared_layout_context.style_context.stylist.rule_tree.dump_stdout(); } - // GC The rule tree. - // - // FIXME(emilio): The whole point of the free list is not always freeing - // the list, find a good heuristic here for that. - unsafe { shared_layout_context.style_context.stylist.rule_tree.gc() } + // GC the rule tree if some heuristics are met. + unsafe { shared_layout_context.style_context.stylist.rule_tree.maybe_gc(); } // Perform post-style recalculation layout passes. self.perform_post_style_recalc_layout_passes(&data.reflow_info, |