Closed
Bug 240559
Opened 20 years ago
Closed 20 years ago
nsTableCellFrame::InitCellFrame does lots of unnecessary work
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bernd_mozilla)
Details
(Keywords: perf)
Attachments
(1 file, 2 obsolete files)
21.31 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Two things here: 1) Why is this function calling GetTableFrame() ? It never uses it.... 2) SetColIndex sets the colindex on the content node, with mumbling about nsHTMLStyleSheet, but nsHTMLStyleSheet knows nothing about colindex. I think we can probably remove that QI and set, remove the colindex stuff from nsHTMLTableCellElement, and maybe remove the nsIHTMLTableCellElement interface.
Reporter | ||
Comment 2•20 years ago
|
||
No. See http://lxr.mozilla.org/seamonkey/search?string=nsIHTMLTableCellElement You may be thinking nsI_DOM_HTMLTableCellElement. Totally different beast.
sorry, I was looking for consumers of the GetColIndex as http://lxr.mozilla.org/seamonkey/source/layout/html/table/public/nsITableCellLayout.h and that is editor
Reporter | ||
Comment 4•20 years ago
|
||
Ah, right. That's implemented by nsTableCellFrame and doesn't involve the content node at all.
This looks like residium stuff from an earlier style system http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/html/table/src/nsTableRowFrame.cpp#56
GetTableFrame() is the secret code to make sure the cellmap exists, Boris you know the cellmap good enough (are old enough...) that I can share this secret with you. Probably most of these GetTableFrame calls are bogus now as I placed in outer table frame a requirement that mInner != nsnull. I think we can remove the whole stuff I mean: - InitCellFrame - SetColIndex - and the content stuff - http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsIHTMLTableCellElement.h
Reporter | ||
Comment 7•20 years ago
|
||
That sounds perfect.
One cannot remove SetColIndex on the frame. But we can remove that on the content node as nobody uses the data on the content node ( I believe so). This patch saves us one QI and 4 bytes per table cell. I also removed that GetSpanValue from the col frame that according to lxr and compile nobody uses.
Assignee | ||
Comment 10•20 years ago
|
||
Attachment #146403 -
Attachment is obsolete: true
Attachment #146404 -
Flags: superreview?(bzbarsky)
Attachment #146404 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 11•20 years ago
|
||
And yes I will remove the nsIHTMLTable*.h files too.
Assignee | ||
Comment 12•20 years ago
|
||
there is even more to remove
Attachment #146408 -
Flags: superreview?(bzbarsky)
Attachment #146408 -
Flags: review?(bzbarsky)
Attachment #146404 -
Attachment is obsolete: true
Attachment #146404 -
Flags: superreview?(bzbarsky)
Attachment #146404 -
Flags: review?(bzbarsky)
Reporter | ||
Comment 13•20 years ago
|
||
Comment on attachment 146408 [details] [diff] [review] patch First of all, this saves _8_ bytes per table cell -- one 32-bit member and one vtable pointer. ;) >Index: layout/html/table/src/nsTableCellFrame.h > virtual nsresult GetColIndex(PRInt32 &aColIndex) const; >- virtual nsresult SetColIndex(PRInt32 aColIndex); >+ void SetColIndex(PRInt32 aColIndex); No reason for GetColIndex to stay virtual, is there? r+sr=bzbarsky. Thanks for cleaning this up!
Attachment #146408 -
Flags: superreview?(bzbarsky)
Attachment #146408 -
Flags: superreview+
Attachment #146408 -
Flags: review?(bzbarsky)
Attachment #146408 -
Flags: review+
Assignee | ||
Comment 14•20 years ago
|
||
I would like to leave it virtual see http://lxr.mozilla.org/seamonkey/source/layout/html/table/public/nsITableCellLayout.h#66
Reporter | ||
Comment 15•20 years ago
|
||
Ah, ok. Sounds good.
Comment 16•20 years ago
|
||
What effect will this have on bug 54542 ?
Reporter | ||
Comment 17•20 years ago
|
||
About 0.5% improvement.
Assignee | ||
Comment 18•20 years ago
|
||
fix checked in as Boris promised btek went up 0.5% :-). Markus its up to you to verify what impact it has on bug 54542 with tomorrows nightly. There have been a couple of performance related checkins that would deserve a quantitative estimate: the checkin for bug 236703 from 2004-04-12 the checkin for bug 240318 from 2004-04-12 and the change of background painting in quirks mode from 2004-04-18 neither of them did show significant changes in pageload. So Markus comming back with some real numbers might be helpfull.
Reporter | ||
Comment 19•20 years ago
|
||
> fix checked in as Boris promised btek went up 0.5% :-).
It's been doing that randomly for a while... ;(
Assignee | ||
Comment 20•20 years ago
|
||
fix completely checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•