stylo: Use id/class flags on snapshots to skip trying to get them if they aren't there

RESOLVED FIXED in Firefox 55

Status

()

enhancement
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

(Blocks 1 bug)

53 Branch
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Assignee: nobody → bzbarsky
Priority: -- → P1
Comment on attachment 8868688 [details]
Bug 1365659 part 1.  Change stylo element snapshot member ordering to pack a bit better.

https://reviewboard.mozilla.org/r/140286/#review144000
Attachment #8868688 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8868689 [details]
Bug 1365659 part 2.  Add id/class flags to stylo snapshots and set them correctly on the Gecko side.

https://reviewboard.mozilla.org/r/140288/#review144002
Attachment #8868689 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8868690 [details]
Bug 1365659 part 3.  Use snapshot id/class flags on the servo side to optimize id/class access on snapshots.

https://reviewboard.mozilla.org/r/140290/#review144004

r=me, thanks for fixing this! :)

::: servo/components/style/gecko/snapshot.rs:171
(Diff revision 1)
>          }
>      }
>  
> +    #[inline]
>      fn has_class(&self, name: &Atom) -> bool {
> +        if self.has_any(Flags::MaybeClass) {

nit: Perhaps for symmetry with the other methods it may be better to use:

if !self.has_any(Flags::MaybeClass) {
    return false
}

snapshot_helpers::..(..)

But not a big deal in any case.
Comment on attachment 8868690 [details]
Bug 1365659 part 3.  Use snapshot id/class flags on the servo side to optimize id/class access on snapshots.

https://reviewboard.mozilla.org/r/140290/#review144008
Attachment #8868690 - Flags: review?(emilio+bugs) → review+
Attachment #8868690 - Attachment is obsolete: true
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a6e31b43d76b
part 1.  Change stylo element snapshot member ordering to pack a bit better.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/296338483720
part 2.  Add id/class flags to stylo snapshots and set them correctly on the Gecko side.  r=emilio
https://hg.mozilla.org/mozilla-central/rev/a6e31b43d76b
https://hg.mozilla.org/mozilla-central/rev/296338483720
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.