When developing files for mobile devices, minimize the amount of data you attempt to load at one time. If you are loading external data into a Flash Lite file (for example, using XML.load), the device’s operating system may generate a “memory failure” error if insufficient memory is allocated for the incoming data. This situation can occur even if the total amount of remaining memory is sufficient.
For example, suppose a file attempts to load an XML file that’s 100 KB, but the device’s operating system has allocated only 30 KB to handle that incoming data stream. In this case, Flash Lite displays an error message to the user, indicating that not enough memory is available.
To load large amounts of data, group the data in smaller pieces—for example, in several XML files—and make several data-loading calls for each piece. The size of each piece of data, and therefore the number of data-loading calls you need to make, varies by device and file. To determine an appropriate balance between the number of data requests and the likelihood of a memory failure, test files on a variety of target devices.
For optimum performance, avoid loading and parsing XML files if possible. Instead, store data in simple name/value pairs and load the data from a text file using loadVars or from precompiled SWF files.