Closed GoogleCodeExporter closed 9 years ago
In 2.1 the code above ran only in IE on windows, now it runs on all browsers.
That is
why it was not a problem in 2.1 for firefox on windows.
Why it makes firefox slow I don't know, but my guess would be that it destroys
some
nifty caching mechanism firefox has by manipulating the DOM before it is
"ready".
Original comment by dele...@gmail.com
on 26 Dec 2009 at 6:51
OK, now I have done some serious research about what is causing the extreme
slowdown.
We have a map application which draws markers for positions and during the drawing
of each marker this is called:
document.body.removeChild(this.tmpImg);
This call is painfully slow when the rows in swfobject2.js mentioned in the bug
report are active (not commented out). Commenting out the rows in swfobject2.js
makes
the removeChild call in our map application lightning fast again.
So this is not a bug in swfobject per se, but a bug in firefox. I strongly
advice
though to rewrite the two rows in another way that does not make subsequent
calls to
removeChild extremely slow.
The fewer consumers of this fine library that do not have insanely illogical
performance issues the better. ;)
Original comment by dele...@gmail.com
on 11 Jan 2010 at 2:00
Thanks for spending the time to investigate this issue further.
Original comment by aran.rhee@gmail.com
on 11 Jan 2010 at 11:12
There is an attempt to use document.getElementsByTagName("body")[0] before it
is defined. Since try/catch is expensive, I have added a simple test
if(!document.getElementsByTagName("body")[0]) to ensure <body> is available
before attempting to add a <span>. Hopefully this clears up some of the
slowness reported in this thread.
Original comment by platelu...@gmail.com
on 21 May 2011 at 6:43
Original issue reported on code.google.com by
dele...@gmail.com
on 26 Dec 2009 at 4:58