aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-09-16 22:58:52 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-10-10 17:02:27 -0700
commit2a790d06dd74b1de0c47d433c7fa3a9d8af03efc (patch)
tree83346e183c3bf7ef3d8d4edf554667bc263e73c4 /components/layout/layout_task.rs
parent878ece58da7f60b45e9230356ac7a5bbf7351e5b (diff)
downloadservo-2a790d06dd74b1de0c47d433c7fa3a9d8af03efc.tar.gz
servo-2a790d06dd74b1de0c47d433c7fa3a9d8af03efc.zip
Use Gecko's simpler Bloom filter instead of one based on hash
stretching. This preserves the usage of the Bloom filter throughout style recalc, but the implementation is rewritten. Provides a 15% improvement on Guardians of the Galaxy.
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index d252b856f06..22068ae460b 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -63,9 +63,7 @@ use std::cell::Cell;
use std::comm::{channel, Sender, Receiver, Select};
use std::mem;
use std::ptr;
-use style;
-use style::{TNode, AuthorOrigin, Stylesheet, Stylist};
-use style::iter_font_face_rules;
+use style::{AuthorOrigin, Stylesheet, Stylist, TNode, iter_font_face_rules};
use sync::{Arc, Mutex, MutexGuard};
use url::Url;
@@ -647,8 +645,7 @@ impl LayoutTask {
None => {
let layout_ctx = LayoutContext::new(&shared_layout_ctx);
let mut applicable_declarations = ApplicableDeclarations::new();
- let mut parent_bf = Some(BloomFilter::new(
- style::RECOMMENDED_SELECTOR_BLOOM_FILTER_SIZE));
+ let mut parent_bf = Some(box BloomFilter::new());
node.recalc_style_for_subtree(&*rw_data.stylist,
&layout_ctx,
&mut parent_bf,