Tuesday, June 19, 2007

I am working on a project that uses AMFPHP right now. I was streaming in a fair amount of data, and things were performing quite well while running it locally. When I finally looked at it online, the app was chugging (from 30fps down to 12 fps) while it's being side-scrolled. After some investigations, I found out it was because I was instantiating 2000+ objects that contains the deserialized data. As soon as I limit the objects down to 500 and keep the rest of the data in one string in CSV format, the app's performance went back up again.

The moral of the story: Watch out not only on the number of movieclips you have on stage at any given time, but also how many objects you are creating.

Right now the load time for the 2000+ datapoints (each taking ~25 bytes, not counting the extra bytes AMF uses while encoding it) is also taking quite a while -- considering that the data size is less than 100KB. I am going to try using CSV string instead of the native data types in the AMFPHP end, gzip it and see how that goes. Will follow up with a report on that end soon.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home