Open Bug 1348136 Opened 7 years ago Updated 2 years ago

stylo: ServoElementSnapshot::AddAttrs should do the HasAny() check in an inline path

Categories

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

enhancement

Tracking

()

Tracking Status
firefox55 --- affected
firefox57 --- wontfix

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

Save a function call on hot paths.
Blocks: stylo-perf
No longer blocks: stylo
Priority: -- → P4
Note that we're already doing an atomic op here to borrow the AtomicRefCell. If that's too hot, we could put the ElementSnapshot directly on the Element (rather than in the ElementData), since it's only ever mutated on the main thread.
I think long-term that will be the right thing to do; it will let us skip a bunch of function calls and FFI and so forth.

We can't do all the savings until we nix the gecko style system, though.
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.