views:

1177

answers:

4

Is there any significant performance/load time impact if single web page will load, say, 10 identical flash objects? 20? 30?.. any evidential data on sustainability of such kind of setup?

This would be the same flash app, each instance serving its own stream.

+1  A: 

There's definitely going to be some overhead in size as there is a certain amount of code that is contained in every swf regardless of it's developer created content.

I'm almost certain there would be speed issues as well, which would see frame rates drop right down the more swfs you add to the page.

To be honest the concept smells a little fishy and i would think there must be a better solution to your problem.

EDIT

Also there is a restriction on having two steams coming over http per domain. Sure you could get around this but it will definitely be an issue.

James Hay
sigh :) if I ever knew a way to split single flash/flex app into parts to be displayed across the page :)
Yurii Rashkovskii
Unfortunately that's not possible. I'd definitely have a rethink of the actual problem and see how it can be solved using a single movie
James Hay
A: 

I found this post which might help. The trick is to use SWFObject to embed your swf files.

I ran into a strange problem today. On the music charts page on Muziboo, I was displaying a list of songs and a playlist on the right. Each song has a small button player done in OpenLaszlo. In firefox everything was fine and in IE (not unusually), the page would freeze for sometime. This would happen once and repeat only if I delete cache and try again. I googled a bit and learnt that it's a good idea to embed give each swf a unique id otherwise the browser misbehaves. I then went ahead and used swfobject to embed the swf files and everything started working great!

Christophe Herreman
A: 

Yes, it'll likely nuke the browser if you go too far down that road.

If you want to deal in multiple streams, perhaps combining all your would-be applets into one giant one might work better. It'll certainly offset the serious overhead you'd have with 10-40 of the little blighters.

If this is a music player, you want to have a serious look at doing some JavaScript remoting. It's fairly trivial to control a flash app via JS so you could have standard HTML/CSS controls without having to load up a billion flash instances.

Oli
A: 

Design-wise this just sounds like a bad idea. You'd be running multiple instances of the Flash player inside a browser, each of which has an individual cost, and the host (in this case the browser) will run all of them on the same thread (with the exception of certain elective asynchronous processes), so you're almost surely going to run into problems of various kinds -- jittery playback, UI blocking, processor burden, memory bloat, consequent instability of the host, etc.

Unless the SWFs are very tiny, and doing very little work, it seems like a design that's just asking for trouble. Indeed you could test such a thing fairly easily; have you run any tests yet? Just curious.

Also curious as to the requirements; we might be able to offer more constructive alternatives if we knew a little more about what you were aiming for. Have you considered simply loading all the SWFs into a single container SWF requiring only a single browser-hosted instance of the Flash player?

Christian Nunciato