Long delay when dynamically loading Flash objects with JavaScript




7 years ago
7 years ago


(Reporter: Dave, Unassigned)




Firefox Tracking Flags

(Not tracked)





7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

I am experiencing a long delay of up to 3-5 full seconds before SWF movies appear after I dynamically load them with JavaScript.  I am starting with a blank DIV element on a page and then building or removing EMBED elements from inside of the DIV based on user interaction.  When I remove the existing SWF it generates a blank white space and there is a noticeable delay before it is filled again with the new SWF.

The delay is not caused by the loading of the script or the loading of the SWF objects as these are taking only a few milliseconds and the visible white space hangs for upwards of 5 seconds on my machine.

This is not happening in Firefox 3.6.  It is only happening in 4.0.1.

Reproducible: Always

Steps to Reproduce:
1. Load page http://i.i.com.com/cnwk.1d/Ads/common/test/v3SWFTest2.html (there is a cookied auto expand)
2. Click SWF Button "Click to Expand"
3. Click SWF Button "Close"

Actual Results:  
When SWF button was pressed and triggered the corresponding JavaScript function on the page there was a long delay between the period when the first SWF object was removed and the second SWF object was generated on the page, producing blank white space for a noticeable period.

Expected Results:  
There should be delay of less than 1 second between the time the old SWF is removed and the new SWF generated, as I am seeing in FireFox 3.6 and other browsers.
I can confirm this for 4.0.1, but against Trunk it's okay.
Version: unspecified → 4.0 Branch

Comment 2

7 years ago
It looks like the problem disappears here:

Last bad nightly: 2011-05-13 First good nightly: 2011-05-14 

Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?tochange=8404426ef391&fromchange=ad1fa68dcaf5

Comment 3

7 years ago
Here is on regression range where the Nightly goes from good to bad, but during 2010 the behavior of Nightly is also bad using the URL in comment 0 - but in a different way (doesn't render OK).

Last good nightly: 2011-01-13 First bad nightly: 2011-01-14

Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=54184cfa6f0e&tochange=9f412256da4c

Comment 4

7 years ago
The URL in comment 0 does not work for me with:
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv: Gecko/20110420 Firefox/3.6.17

I just get one red line at the top of the screen, and nothing more seems to happen.

Comment 5

7 years ago
I had left a few console commands in the JS for debugging in Firebug which was causing some problems when Firebug isn't running, I've removed them now.

I'll try testing some more on a few different machines with the cache cleared to confirm.

Thanks for taking a look at this!

Comment 6

7 years ago
The first bad revision is:
changeset:   60439:b9029c71a63a
user:        Oleg Romashin <romaxa@gmail.com>
date:        Thu Jan 13 15:20:53 2011 +0200
summary:     Bug 619176 - Plugins get Visible state every time when scrolling (:BuildLayer always make them visible). r=roc a=approval2.0

Comment 7

7 years ago
The first good revision is:
changeset:   69430:9cfa7843408b
user:        Robert O'Callahan <robert@ocallahan.org>
date:        Fri May 13 02:59:21 2011 +1200
summary:     Bug 648277. Ensure we request a plugin geometry update for a new windowless plugin that may need its visibilty state updated. r=tnikkel


7 years ago
Component: General → Plug-ins
Keywords: regression
OS: Windows 7 → All
Product: Firefox → Core
QA Contact: general → plugins
Hardware: x86 → All
Version: 4.0 Branch → Trunk

Comment 8

7 years ago
Bug 648277, comment 14 tracked down the same changeset as I did in comment 6. This bug is apparently a duplicate of:

Bug 648277 - Flash fails to paint until mouse is moved

And indeed, if you use Firefox 4.0.1 and sweep the mouse pointer over the screen the current testcase gets updated faster.
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 648277
You need to log in before you can comment on or make changes to this bug.