Closed Bug 260372 Opened 20 years ago Closed 14 years ago

Javascript date scroller renders mozilla useless

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
major

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: Usul, Unassigned)

References

()

Details

(Keywords: perf, qawanted)

Attachments

(1 file)

The code below make mozilla - Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;
en-US; rv:1.8a4) Gecko/20040919 - and Camino Camino 2004091508 (v0.8+) start a
beachball of death. I need to kill the application in order to be able to use
them again. I could not find anything related in quick queries of bugzilla.
Pinkerton is cced because it affects Camino. I can't test this on another
platfform today, but will tomorow on win32.

Code :
<FORM name="news17">
<div align="center"><INPUT TYPE="text" SIZE="70" NAME="texte17"
VALUE="Derni?re mise ? jour Dimanche 19 Septembre 2004 ? 16h30&nbsp; ... Merci
de votre visite ! ! !&nbsp;&nbsp;&nbsp; .... Un Forum est ouvert dans la
rubrique &quot;infos&quot; concernant vos recherches et questions..... "
style="font-size:16px;font-family:Tahoma;background-color:transparent;border:0;font-weight:bold;color:#0063ff"></div>
<script language="JavaScript">
zone17 = "";
origine17 = 0;
stop17 = -1;
function depart17()
{
switch (stop17)
{
case 0  : return;
case -1 : zone17 = new String(document.forms["news17"].texte17.value) + "   ";
case 1  : delai = setInterval("defile17()", 200);
stop17=0;
defile17();
}
}
function defile17()
{
document.forms["news17"].texte17.value = "";
for (var n=0, i = ++origine17 % zone17.length; n<zone17.length; n++)
{
document.forms["news17"].texte17.value += zone17.charAt(i);
i = (++i % zone17.length);
}
}
depart17();
</script>
</FORM>

I will attach a html file reproducing the problem right away. This is I believe
not a regression since the problem is present in Mozilla 1.6.
Whiteboard: DUPME
I also see this using FF trunk 20050915 on Win2k and FF trunk 20040917 on Linux,
CPU maxed out 100% and a possible memory leak (300kb/sec) ?
Chyanging settings based on olivier's comment. I failed to mention the site
works with Safari.
OS: MacOS X → All
Hardware: Macintosh → All
Duplicate of bug 83841. The loop in defile17() takes over one second to execute, 
but the interval is set to 200ms. If I modify the function so that it builds a 
string inside the loop and then set the input's value only once, after the loop, 
the loop takes <16ms and the script runs fine.
seems like something that should be fixed before 1.0
Flags: blocking-aviary1.0?
Not a JS engine issue; over to DOM.

On Linux I can't reproduce the problem (CPU hovers around 50%), so someone on
Mac will need to profile this...

If this is indeed a duplicate of bug 83841, there is no way it's getting fixed
on any branches any time soon.
Assignee: general → general
Component: JavaScript Engine → DOM
Depends on: 83841
Keywords: qawanted
QA Contact: pschwartau → ian
Whiteboard: DUPME
if a well tested patch appears renominate.
Flags: blocking-aviary1.0? → blocking-aviary1.0-
Assignee: general → nobody
QA Contact: ian → general
WFM in Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Still high CPU here on Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.4pre) Gecko/20100408 Lorentz/3.6.4pre
Works reasonable well on trunk (FF3.7pre).
WFM too
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: