javascript is very slow for this example

REOPENED
Unassigned

Status

()

Core
DOM: Core & HTML
REOPENED
17 years ago
2 years ago

People

(Reporter: Brian Degenhardt, Unassigned)

Tracking

(Blocks: 1 bug, {perf, testcase})

Trunk
perf, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(4 attachments)

(Reporter)

Description

17 years ago
I've got some heiarchial menu code written in javascript that works fine with IE
and NS 4.XX but takes forever to render with mozilla.  During the rendering
time, mozilla sits at 100% cpu usage.
(Reporter)

Comment 1

17 years ago
Created attachment 39558 [details]
html/javascript code that triggers this bug
(Reporter)

Comment 2

17 years ago
Created attachment 39559 [details]
just the html file if you don't like zip
(Reporter)

Comment 3

17 years ago
Some more info, it seems that this bug get's triggered more often when the page
is already cached, so if you clicked on the html attachment and nothing
happened, try it again, or try the back/forward button a few times to re-render it.

I'm getting brave here, so I'm gonna slap the 4xp keyword on this thing since it
works with the Netscape 4.76 on Linux that I've tested.

Sorry if I have the wong component.
Keywords: 4xp

Comment 4

17 years ago
confirmed WinXP/20010619
adding perf keyword
Platform/OS->All
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: perf
OS: Linux → All
Hardware: PC → All

Updated

17 years ago
Status: NEW → ASSIGNED

Updated

17 years ago
Blocks: 91351

Comment 5

17 years ago
I downloaded the test case and meaqsured the time needed for complete rendering
of the screen, after hitting the first arrow: 
NS4.7: 1.6 sec, checkboxes are not displayed
Moz 04-29-2001: 1.1 sec
Moz 0.9.5: 1.3 sec, no visual problems
Moz 2001102503: 1.1 sec, no visual problems
IE5.5: 0.7 sec, no visual problems

system spec: Win98, K6-III/400, 192MB ram.

Updated

17 years ago
Blocks: 21762

Updated

17 years ago
Keywords: testcase
(Reporter)

Comment 6

17 years ago
Just an FYI, the first attachment is a .zip file that contains a more usable
testcase than the second example.
(Reporter)

Comment 7

17 years ago
Also note that it's not slow if you run it off of local disk (IE: using a
file:// url).  The testcase has to be delivered by a remote webserver.
(Reporter)

Comment 8

17 years ago
Created attachment 58382 [details]
jprof output JPROF_FLAGS='JP_DEFER JP_PERIOD=0.0020'
(Reporter)

Comment 9

17 years ago
Created attachment 58383 [details]
jprof output JPROF_FLAGS='JP_REALTIME JP_DEFER JP_PERIOD=0.0020'

Updated

17 years ago
Attachment #39558 - Attachment mime type: application/octet-stream → application/x-zip-compressed
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs
Status: ASSIGNED → NEW
Attachment #39558 - Attachment mime type: application/x-zip-compressed → application/zip
Is this still an issue?  I'm not seeing any slowness on those testcases....
OK, I can reproduce the slowness, depending on my cookie settings.  The
getCurrState() function seems to do this really slow walk over the cookie
string, and it's called a lot.  So doubling the length of the cookie string
doubles the execution time of this code....
I can still reproduce this with latest Fx3b5pre on WinXP.

Clicking on a category takes some time comparing to IE7 and uses 40% of CPU comparing to 4-6% in IE7
Are your cookies exactly identical in the different browsers?
Assignee: general → nobody
QA Contact: desale → general

Comment 15

7 years ago
Build ID: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b13pre) Gecko/20110303 Firefox/4.0b13pre

WFM. Compared with both IE 8 and Chrome. Note that this bug was originally comparing the performance of Mozilla with NS 4 and IE 5.5.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
José Jeria, I assume you tested with various cookie settings, etc?  See comment 12.

Comment 17

7 years ago
(In reply to comment #16)
> I assume you tested with various cookie settings, etc?  See comment
> 12.

No sorry.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Comment 18

2 years ago
Brian, have you tried testing with the latest version of Firefox?
You need to log in before you can comment on or make changes to this bug.