Closed
Bug 107265
Opened 24 years ago
Closed 24 years ago
2.8% of window close time in JS_ClearScope
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla0.9.6
People
(Reporter: dbaron, Assigned: brendan)
References
Details
(Keywords: js1.5, perf)
Attachments
(1 file)
|
6.85 KB,
patch
|
shaver
:
review+
jband_mozilla
:
superreview+
|
Details | Diff | Splinter Review |
2.8% of window close time (23 hits in the profile cited on bug 104127) is spent
in JS_ClearScope, at the stack:
js_FlushPropertyCacheByProp
js_DestroyScopeProperty
js_DropScopeProperty
js_free_symbol
JS_HashTableDestroy
js_hash_scope_clear
js_Clear
JS_ClearScope
GlobalWindowImpl::SetNewDocument(nsIDOMDocument*, int)
DocumentViewerImpl::Close()
nsDocShell::Destroy()
(Well, ok, this is the stack for 22 of the 23 hits in JS_ClearScope -- the other
hit I saw was locking within JS_Free from within js_hash_scope_clear.)
| Assignee | ||
Comment 1•24 years ago
|
||
I'll make this better now.
/be
Status: NEW → ASSIGNED
Keywords: js1.5,
mozilla0.9.6
Priority: -- → P1
Target Milestone: --- → mozilla0.9.6
| Assignee | ||
Comment 2•24 years ago
|
||
| Assignee | ||
Comment 3•24 years ago
|
||
I want to nail this before double hashing, which I need to get back to stat.
How about fast r= and sr= if this makes dbaron happy?
/be
| Reporter | ||
Comment 4•24 years ago
|
||
Re-profiling showed much fewer hits in one profile (and mostly in free) and no
hits at all in another profile, so this seems to have helped.
Comment 5•24 years ago
|
||
Comment on attachment 55482 [details] [diff] [review]
proposed fix
r=shaver.
Attachment #55482 -
Flags: review+
Comment 6•24 years ago
|
||
Comment on attachment 55482 [details] [diff] [review]
proposed fix
sr=jband
No nesting can prematurely clear cx->clearingScope in a way that would matter?
Attachment #55482 -
Flags: superreview+
| Assignee | ||
Comment 7•24 years ago
|
||
jband: control flows into clear, then to js_free_symbol, to
js_DropScopeProperty, which calls js_DestroyScopeProperty on last deref; the
only other calls are to js_FreeSlot, js_FlushPropertyCacheByProp, and JS_free.
No nesting possible on a given cx.
/be
Comment 8•24 years ago
|
||
Hey, you know, someone later might change this code and not realize that the
lack of nesting is really important. JS_ASSERT(cx->clearingScope) before you
set it to false, as a safety net?
| Assignee | ||
Comment 9•24 years ago
|
||
shaver, I'm about to decimate this code for double hashing. See bug 62164. But
ok, I'll add an assert for the short run ("someone later" -- as if!).
/be
Comment 10•24 years ago
|
||
Yeah, yeah. Indulge me.
| Assignee | ||
Comment 11•24 years ago
|
||
Fixed.
/be
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 12•24 years ago
|
||
Marking Verified based on dbaron's findings at 2001-10-28 16:52 above -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•