Closed
Bug 304759
Opened 19 years ago
Closed 19 years ago
Avoid link map maintenance when tearing down document
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
References
Details
(Keywords: fixed1.8, perf)
Attachments
(1 file)
7.15 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
dbaron
:
approval1.8b4+
|
Details | Diff | Splinter Review |
bz's profile shows the fix for bug 78510 added significant cost when tearing
down documents. In particular, for every link, UnbindFromTree calls ForgetLink
which constructs a new URI for the link, which is expensive.
We can fix this by destroying the link map before calling UnbindFromTree when we
know that all the document's elements are being unbound. Then in ForgetLink we
just check to see if the map is empty before we do anything.
Updated•19 years ago
|
Flags: blocking1.8b4+
Assignee | ||
Comment 1•19 years ago
|
||
This fix appears quite straightforward.
Attachment #192872 -
Flags: superreview?(bzbarsky)
Attachment #192872 -
Flags: review?(bzbarsky)
Comment 2•19 years ago
|
||
Comment on attachment 192872 [details] [diff] [review]
fix
Excellent. r+sr=bzbarsky if you also fix nsDocument::ReplaceChild (see the
code at
http://lxr.mozilla.org/seamonkey/source/content/base/src/nsDocument.cpp#3640
which removes and unbinds the node and then possibly resets mRootContent; in
the case when it would do this last, you want to clear the link map before
removing and unbinding).
Attachment #192872 -
Flags: superreview?(bzbarsky)
Attachment #192872 -
Flags: superreview+
Attachment #192872 -
Flags: review?(bzbarsky)
Attachment #192872 -
Flags: review+
Assignee | ||
Comment 3•19 years ago
|
||
checked into trunk. Let's look for branch approval once we see the trunk Tp impact.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•19 years ago
|
||
Comment on attachment 192872 [details] [diff] [review]
fix
This seems to have reduced the impact of 78510 to almost zero. definitely
should go on the branch.
Attachment #192872 -
Flags: approval1.8b4?
Attachment #192872 -
Flags: approval1.8b4? → approval1.8b4+
Comment 5•19 years ago
|
||
WOOT!
bz's review comment didn't seem to make it into the version checked in to the
branch.
Assignee | ||
Comment 8•19 years ago
|
||
oops, I'll fix that. Thanks for picking it up!
Assignee | ||
Comment 9•19 years ago
|
||
checked that in.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•