Closed
Bug 400688
Opened 18 years ago
Closed 17 years ago
More performance friendly css rules for the Identify Panel (larry)
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
VERIFIED
WONTFIX
People
(Reporter: alfredkayser, Assigned: johnath)
References
Details
(Keywords: perf)
From bug 383183, comment 138:
The following rules in the .css are not very performance friendly:
.verifiedIdentity > #identity-popup-encryption > * >
#identity-popup-encryption-icon,
.verifiedDomain > #identity-popup-encryption > *
>#identity-popup-encryption-icon {
Instead of passing the state like through CSS child selectors, why not make an
attribute 'verified' (or something like that) and let the XUL inherit it to the
right elements. So that each element can do:
#identity-popup-encryption-icon[verified="identity"]{...}
Comment 1•18 years ago
|
||
The "key selector" in each of those is an ID, so it should be fine. I wouldn't count on XUL inheritance being faster than CSS matching on parents ;)
http://developer.mozilla.org/en/docs/Writing_Efficient_CSS
Comment 2•18 years ago
|
||
It really depends on the use cases. If the attribute changes a lot, I'd use the rules as given, because XBL attr inheritance is not so fast.
If the attribute doesn't change much, but style is reresolved often, then having a single attr selector might be faster.
If neither is true, it probably doesn't matter what you do, since the code is not on a critical path.
| Reporter | ||
Comment 3•18 years ago
|
||
Actually, the attribute only 'changes' (set) when the popup/panel is opened.
As far as I understood, having such inheritance rules like above, means that all objetcts where the right-most match applies continously need to check this rule, climbing the tree.
But, indeed as that rightmost element is an id (#identity-popup-encryption-icon), only objects with that specific ID will be checked for this rule. But, these rules still seem inefficient to me, and they depend on the layout structure (so any change to the XUL may make this rule invalid).
Updated•18 years ago
|
Version: unspecified → Trunk
| Assignee | ||
Comment 4•17 years ago
|
||
This bug has been stale for a while, and based on comment 1 and comment 2, it's of dubious benefit anyhow. I'm not planning to do this, so I could just reassign it to nobody, but I think it would just languish moreso there, so I'm going to resolve it WONTFIX.
Alfred, if you think you want to work on a patch or find someone who does, please feel free to reopen, but a) I don't want it to stay here and age, and b) I think I'd want to see a compelling case that the change would have a perf impact before we change it. Given the vagaries of XBL inheritance and the conflicting hunches, I think we'd want hard data here, and I'm not sure it's worth it, for only-when-requested UI.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Target Milestone: Firefox 3 beta1 → ---
| Reporter | ||
Comment 5•17 years ago
|
||
Agree, too much work for very small and unknown benefit.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•