Closed
Bug 596140
Opened 14 years ago
Closed 14 years ago
reduce size of CSS style rules
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla2.0b7
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
(Keywords: memory-footprint)
Attachments
(2 files)
1.02 KB,
patch
|
bzbarsky
:
review+
roc
:
approval2.0+
|
Details | Diff | Splinter Review |
16.49 KB,
patch
|
bzbarsky
:
review+
roc
:
approval2.0+
|
Details | Diff | Splinter Review |
jseward showed me some data today showing how much memory CSS style rules were taking up. While there's more we can do to reduce their size, I noticed two very easy wins.
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #474991 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•14 years ago
|
||
nsCSSRule doesn't really need a vtable pointer, and most of its methods didn't need to be virtual in the first place. The only ones that really did were AddRef and Release, which I just pushed down to derived classes. That's a slight codesize increase, but one we really ought to find better solutions to...
Attachment #474993 -
Flags: review?(bzbarsky)
Comment 3•14 years ago
|
||
(as mentioned yesterday to bz) I also have a rudimentary hot-field profiler, which might help in finding these kinds of opportunities. I'll see if I can get some results from it today.
Comment 4•14 years ago
|
||
Comment on attachment 474991 [details] [diff] [review] patch 1: turn mWasMatched into a bit, stealing a bit from mLineNumber I believe MSVC won't pack bitfields of incompatible type. So you need to make mWaasMatched a PRUint32 as well. r=me with that.
Attachment #474991 -
Flags: review?(bzbarsky) → review+
Comment 5•14 years ago
|
||
Comment on attachment 474993 [details] [diff] [review] patch 2: eliminate all virtual methods from nsCSSRule r=me.
Attachment #474993 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•14 years ago
|
Attachment #474991 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #474993 -
Flags: approval2.0?
Attachment #474991 -
Flags: approval2.0? → approval2.0+
Attachment #474993 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/ebb67011bb43 http://hg.mozilla.org/mozilla-central/rev/d09dcf95a050 http://hg.mozilla.org/mozilla-central/rev/c12c5e990eda
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b7
Assignee | ||
Comment 7•14 years ago
|
||
The final patch was: * the addition of NS_FINAL_CLASS per discussion with bz * a missing virtual on ~nsCSSGroupRule that I noticed when doing that
You need to log in
before you can comment on or make changes to this bug.
Description
•