Closed Bug 20754 Opened 26 years ago Closed 25 years ago

Javascript animation does not finish

Categories

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

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: sitsofe, Assigned: pnunn)

References

()

Details

Attachments

(1 file)

At the bottom of the page there are some pictures and when you hover over them they animate with Javascript. However, in Mozilla the last frame (the explosion) is not shown. This page works fine in both NS 4.5 and IE 4.01 on WinNT 4 and NS 4.6 on Linux. Expected: Flicker then explosion. Result: Flicker but no explosion. System: Build ID: 1999120216 Linux
Assignee: mccabe → vidur
Component: Javascript Engine → DOM Level 0
Looks like you need to click on the 'napalm' area to get to the problem page. It looks like the problem is with either setTimeout or assigning to image.src. Reassigning to the DOM component in the hopes that somebody can look more closely at this. sitsofe - I've seen stuff like this, and this might be a duplicate bug; it'd be a big help if you could do some bugzilla searches (on setTimeout or image.src, possibly) to see if it is. Thanks! Mike
Closest I could find after exhaustive searching was bug 15215. Sorry.
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
Assignee: vidur → pnunn
Status: ASSIGNED → NEW
Here's what's happening: the explosion image is pre-loaded, but only stored in the image cache in its default size. When the scaled version of it is used for each of the animated buttons, we don't get a hit in the image cache since the cache stores images in their final displayed size. As a result, we start loading the image again from a stream. Since we currently don't have a networking cache, the stream load happens across the network. The load is aborted since the animation timeout fires before it completes and we never actually load and decode the scaled image. Turning on the memory cache helps the problem but, even with it on, loading and decoding of images seem slower than they were in 4.x. Of course, if the timeout for the last frame were made short enough, we'd see the same problem in 4.x as well. I'm not sure what to do with this bug - there's little else we can do on the DOM side. Here are the alternatives: 1) We can and should profile image loading and work on performance. 2) We can investigate storing cached images in their original size and using StretchBlt type methods to do the scaling on the fly (at least for platforms that support it). This way, preloading the image will actually do something worthwhile. 3) We leave things as they are and just rely on caching to improve performance in some cases. Passing the bug on to pnunn to investigate the first couple of options.
Status: NEW → ASSIGNED
Target Milestone: M14
I've got to ponder this one awhile. -pn
It would be really great if I could get a copy of this page so it doesn't load the next page immediately. -pn
hint hint It would be really great if I could get a copy of this page so it doesn't immediately load the next page. -pn
Target Milestone: M14 → M15
moving out milestone.
I'm sorry I haven't replied to this sooner but the page with the script on it chanaged so I had to mail the author of the page to get a copy (thanks johnc@clickboom.com!). I haven't had time to work on it to turn it into a working page so I'll post it up as-is for now.
Attached file Original napalm page
much thanks. I'll dig back into it after the time crunch. -p
Moving to m17
Target Milestone: M15 → M17
Priority: P3 → P2
Moving to m18
Target Milestone: M17 → M18
In looking at this bug I'm having trouble generating the original problem. The html page was attached, but no images. In trying to create a similar effect, it appears to be working ok.. I'm marking as fixed. But if you can give me another example of the bug, reopen this bug or create a new one for the problem. -P
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: