Closed Bug 658008 Opened 13 years ago Closed 13 years ago

Long delay when dynamically loading Flash objects with JavaScript

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 648277

People

(Reporter: dw_thomas77, Unassigned)

References

()

Details

(Keywords: regression)

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.
http://nightly.mozilla.org/
Version: unspecified → 4.0 Branch
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
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
The URL in comment 0 does not work for me with:
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17

I just get one red line at the top of the screen, and nothing more seems to happen.
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!
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
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
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
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.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.