Hello

I have a flex project that is consuming XML data from a web service;
(the detail of which is that  it's coming across in an XStream
serialised form).

In flex, I can parse this, and convert it into native objects (with
effectively an ActionScript implementation of XStream). Unfortunately,
the performance is horrible. For around 1Mb of data, representing
about 3500 objects to be created, takes around 5 seconds. If 1Mb was
the largest document size, I could probably live with it... but of
course it isn't.

Now, I had hoped to use the flex profiler in order to try and
determine which bit is actually slow, as quite a bit of effort has
gone into caching things that are known to be slow (e.g. class
definition lookups). Unfortunately, again, the flex profiler seems to
not be very useful. Firstly it doesn't often report on some classes at
all, it often reports obviously bogus values (e.g. methods with
cumulative time, but no actual calls (!)). It looks as if internal VM
time, perhaps doing things like XML.getAttribute aren't being included
(my gut feel is that my code is running reasonably fast, it's just
coming up against VM performance that just isn't terribly good)., or
perhaps that it's not recording in anything like a useful level of
granularity. And because there's no threading, I can't even mitigate
it by putting it in a background updater thread.

I could probably add some AMF3 support. There's a variety of reasons
why I didn't want to do that, as it's yet another output format to
have to add on the server, which has already quite a bit of extra code
to deal with things like removing hibernate proxies. TBH, it's
disappointing the performance is so poor and is likely to add to the
calls to be switching to silverlight.

Are there any better profilers? Are there any details on the
performance characteristics of the XML support, that I might use to
speed it up?

Reply via email to