Skip to main content
Known Participant
October 21, 2013
Question

Flash object with 0x0 dimensions = performance hit

  • October 21, 2013
  • 2 replies
  • 2046 views

The basic scenario is that I'm doing RTMP playback in a Flash app that basically only deals with sound. There are no graphical elements, and it interacts with the page only using the ExternalInterface and method calls / callbacks, therefore we have set the height and width of the object in the HTML page to 0.

Unfortunately the result seems to be that at least 500ms latency is added to any RTMP playback - connecting the NetConnection to the FMS server, starting the NetStream and then seeking within that stream. Raise the dimensions of the Flash object in the page to at least 1x1 and the performance returns to normal acceptable levels.

I've experimented a bit with the Stage settings to see if it is some oddity relating to alignment, scaling etc but to no effect. Is this a bug?

This topic has been closed for replies.

2 replies

Participating Frequently
October 26, 2013

If the issue exists when you set the dimensions to 0x0, don't set the dimensions to 0x0.  Unless you're just geeking out on weird rules or issues.

ohookinsAuthor
Known Participant
October 27, 2013

I'd prefer to find an actual solution, not just cargo-cult my application.

If there is an actual bug it needs to be filed, and if there is a bug in my application I'm not aware of I need to know the actual reason of it rather than just stabbing in the dark randomly.

Inspiring
October 28, 2013

It sounds like a bug to me, I can't think of any good reason a 0x0 SWF should affect NetConnections/Streams. Therefor any solution I would consider a hack. I would try the different wmodes -- I don't know what you're currently using, but wmode=transparent is known to be rather buggy.

I would also suspect framerate. What is your SWF framework? What is the measured framerate? Here's a theory: perhaps when you set the SWF to 0x0 the Flash Player throttles the framerate down to 2fps (500ms per frame) which could cause a delay in event processing for NetConnection (it seems like it shouldn't but maybe it does?)

Cheers.

-Aaron

Inspiring
October 22, 2013

I've not heard of this issue, does this happen in all browsers? I just looked and Pandora embeds its SWF at 0x0.

-Aaron

ohookinsAuthor
Known Participant
October 22, 2013

I've only tested on Mac so far, but can reproduce on Chrome, Safari, Firefox and Opera.