Closed Bug 332321 Opened 19 years ago Closed 6 years ago

Eliminate nsRuleNode::Get##struct##Data

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: perf)

Attachments

(1 file)

The nsRuleNode::GetStructData can be removed -- I've been wanting to remove them for ages. This gets rid of an if-else chain that's a performance issue and also is a step towards making the computation table-driven, which we'll need to do for css3-values features that I'd like to implement.
So it turns out I can't actually do this without doing the whole table-driven thing.
Attached patch work so far (deleted) — Splinter Review
Depends on: 332335
Actually, if the constructors of the nsRuleData* were all equivalent to memset-to-zero (probably true) and the destructors were all no-op (probably not, due to refcounting, but perhaps doable), then this wouldn't need bug 332335. And only part of bug 332335 is really need for the css3-values stuff I want to do.
Keywords: perf
See bug 360870 for some changes in this area that we may want to partly revert when doing this.
QA Contact: ian → style-system
We could probably do this without table-driven stuff, but we'd want to change the ownership model of the data inside nsCSSStruct (to user manages). Also, the nsRuleNode::GetStyleData code would need to look like: nsStyleSet *set = mPresContext->PresShell()->StyleSet(); nsRuleData *ruleData = set->PushWalkingRuleData(); ... WalkRuleTree(...) set->PopWalkingRuleData(); since we can recur into this code.
nsRuleNode is gone.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: