1 Reply Latest reply on Aug 6, 2007 4:33 PM by ntsiii

    HttpService resultFormat e4x v. object

    tony.k
      hi,
      anyone have any idea if there is any appreciable performance difference between using e4x format and object format?

      i'm trying to figure out which of these two formats to use under what circumstances and i believe that performance is one of the criteria to consider.

      subsequent usage intention for the structure is the next obvious thing to look at, but i need to start somewhere ;)

      i'm guessing object format would take more cycles to accomplish, but hey, what do i know...?

      thanks,
      tony.
        • 1. Re: HttpService resultFormat e4x v. object
          ntsiii Level 3
          Use e4x.

          First, unless you are using RemoteObject, you data is probably XML already. resultFormat="object", the default, causes Flex to attempt to convert your xml into an nested object structure. This is a "black box" behavior. Predicting the output structure is difficult. This conversion also takes time.

          Second, e4x XML has huge functionality built in. You can search, filter the data efficiently and easily. You will have to write recursive functions to do that with a nested object structure.

          XML is easily handled in XMLList and XMLListCollection objects with their methods. With object you have to do it all yourself.

          Finally, AS is very fast. Performance is always a good thing, but until you are an expert on issues like when to use cacheAsBitmap, you will be better served focusing on UI rendereing performance, not machine cycles.

          Tracy