Status

()

--
critical
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: bzbarsky, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

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.
I think this is a dup of bug 347306.

/be
Depends on: 347306
Patch that fixes the O(n^2) problem for typical lookup patterns is now attached in bug 346306.

/be

Comment 3

12 years ago
bz, did the fix for bug 347306 make the Zimbra hang go away?
(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.
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
Last Resolved: 12 years ago
Resolution: --- → FIXED
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)
> 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.
(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

12 years ago
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.