Posts Tagged size

How Big Is That Class?

Tags: , , , , , , , ,

When you instantiate one of your classes, how much memory does it use? Today’s article tries out a lot of combinations and counts the bytes used. The conclusion is easy to remember and will give you a solid understanding of how much memory your app is using.

Read the rest of this article »

5 Comments

JPEG Compressor Roundup

Tags: , , , , , , ,

Now that we’ve determined the best PNG compressors to create PNG images with, let’s delve into the world of JPEG compressors. As with PNG, we have multiple options to choose from in our Flash apps when we’re looking to encode images such as screenshots. Which is best? Today’s article delves into each compressor’s performance and file size efficiency.

Read the rest of this article »

3 Comments

Serialize Anything: Part 2

Tags: , , , , , , , , , ,

One of the new features in Flash Player 11 is a native JSON encoder/decoder class. In the Serialize Anything article, I neglected to add JSON as an option for serializing and deserializing arbitrary objects. In today’s followup we’ll take a look at the performance of the native JSON class and compare it to ByteArray.readObject/writeObject and XML.

Read the rest of this article »

10 Comments

The Importance of Pre-Allocation

Tags: , , , , , ,

When you construct an Array or a Vector, you can specify an initial size. Why would you do this?There are various reasons you may want to reserve initially-unused slots for logic reasons, but are there any performance gains to be had by pre-allocating this space for an Array or Vector you intend to completely fill right away? Today I’ll take a look to see just how much performance can be gained by pre-allocating Arrays and Vectors.

Read the rest of this article »

3 Comments