Closed
Bug 355805
Opened 18 years ago
Closed 18 years ago
js_GetSrcNote is O(N^2)
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Unassigned)
References
Details
STEPS TO REPRODUCE:
1) Enable JS strict warnings
2) Load http://mail.mozilla.com (or probably any other Zimbra page).
3) Observe the hang.
4) Profile it.
EXPECTED RESULTS: No hang, hence nothing to profile
ACTUAL RESULTS:
Total hit count: 206039
Count %Total Function Name
125273 60.8 js_GetSrcNote
66450 32.3 js_SrcNoteLength
Brendan sez:
<brendan> yes, js_GetSrcNote has O(n^2) growth
<brendan> know bug, wanted to fix it for 1.9alpha
The JS file in question (Zimbra's Ajax_all.asc) is 600-some KB.
Comment 2•18 years ago
|
||
Patch that fixes the O(n^2) problem for typical lookup patterns is now attached in bug 346306.
/be
Comment 3•18 years ago
|
||
bz, did the fix for bug 347306 make the Zimbra hang go away?
Comment 4•18 years ago
|
||
(In reply to comment #3)
> bz, did the fix for bug 347306 make the Zimbra hang go away?
I was seeing the Zimbra hang too (due to strict warnings being enabled), and bug 347306 fixed it for me.
Reporter | ||
Comment 5•18 years ago
|
||
OK, hang is down from "forever" to "15 seconds or so". Marking fixed; I'll file a followup on the remaining perf issues.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 6•18 years ago
|
||
js_SrcNoteLength was never a problem, because note arity is <= 3.
/be
Summary: js_GetSrcNote and js_SrcNoteLength are O(N^2) → js_GetSrcNote is O(N^2)
Reporter | ||
Comment 7•18 years ago
|
||
> js_SrcNoteLength was never a problem
That's not what jprof said. Unless it was simply in the profile because of the large number of calls from js_GetSrcNote?
I filed bug 355951 on the remaining issue.
Comment 8•18 years ago
|
||
(In reply to comment #7)
> > js_SrcNoteLength was never a problem
>
> That's not what jprof said. Unless it was simply in the profile because of the
> large number of calls from js_GetSrcNote?
Yes.
/be
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•