mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #18431 - mbrubeck:pdb-size, r=SimonSapin
Use SmallBitVec to optimize size of PropertyDeclarationBlock https://bugzilla.mozilla.org/show_bug.cgi?id=1398322 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18431) <!-- Reviewable:end -->
This commit is contained in:
commit
e7f45028dc
12 changed files with 146 additions and 125 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
use {Atom, LocalName, Namespace};
|
||||
use applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList};
|
||||
use bit_vec::BitVec;
|
||||
use context::{CascadeInputs, QuirksMode};
|
||||
use dom::TElement;
|
||||
use element_state::ElementState;
|
||||
|
@ -35,6 +34,7 @@ use selectors::sink::Push;
|
|||
use selectors::visitor::SelectorVisitor;
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
|
||||
use smallbitvec::SmallBitVec;
|
||||
use smallvec::VecLike;
|
||||
use std::fmt::Debug;
|
||||
use std::ops;
|
||||
|
@ -1560,7 +1560,7 @@ impl Stylist {
|
|||
element: &E,
|
||||
bloom: Option<&BloomFilter>,
|
||||
flags_setter: &mut F
|
||||
) -> BitVec
|
||||
) -> SmallBitVec
|
||||
where
|
||||
E: TElement,
|
||||
F: FnMut(&E, ElementSelectorFlags),
|
||||
|
@ -1575,7 +1575,7 @@ impl Stylist {
|
|||
// This means we're guaranteed to get the same rulehash buckets for all
|
||||
// the lookups, which means that the bitvecs are comparable. We verify
|
||||
// this in the caller by asserting that the bitvecs are same-length.
|
||||
let mut results = BitVec::new();
|
||||
let mut results = SmallBitVec::new();
|
||||
for (data, _) in self.cascade_data.iter_origins() {
|
||||
data.selectors_for_cache_revalidation.lookup(
|
||||
*element,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue