Open Bug 1365476 Opened 7 years ago Updated 2 years ago

stylo: class handling during restyle hint computation may be suboptimal


(Core :: CSS Parsing and Computation, enhancement, P4)

53 Branch



Tracking Status
firefox57 --- wontfix


(Reporter: bzbarsky, Unassigned)


(Blocks 1 open bug)


(Keywords: perf)

In compute_hint (over in we do this:

  snapshot.each_class(|c| if !el.has_class(c) { additional_classes.push(c.clone()) });

The each_class call only does a single FFI call to get the list of classes in the snapshot.  But then for each one we do an FFI call that gets the class attr for the element, etc.  If we have multiple classes, this is a bunch more calls than we really need to do, I suspect.  It might be better to just get both lists once and then compare them directly without more FFI traffic.
Keywords: perf
Blocks: stylo-perf
Priority: -- → P4
status-firefox57=wontfix unless someone thinks this bug should block 57
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.