I haven't looked at the Royale XML code, but because most everything is
replaceable, you can always just grab the String from the server result or
wherever you got it and hand it off to a custom parser.

The DataBindingExample in Royale uses a lazy JSON parser, just so I could
show that lazy parsing could be part of the framework.   I have no idea if
it is faster than using the browser to parse JSON or in your case, XML,
but I think we've made it possible.

It really comes down to whether you have control over the result set.
Once your result set is larger than, say, 1MB of text or maybe even 250K,
the odds that you can display all of that text on the screen at once is
very low.  So, if you can avoid bringing down stuff you aren't going to
display right away, you will save bandwidth costs and get better
performance.  But some folks don't have a choice since they are using some
legacy web service.  The lazy parsing answer assumes that they can't
change the web service result set.

If you can change the result set, you should try paging it in.  Flex
supports on-demand paging, or you can page in the background by asking for
the first 50 rows or so, then on the resultEvent, ask for the next 50 and
append them to the collection.

My 2 cents,
-Alex

On 2/16/18, 2:23 AM, "Gabe Harbs" <harbs.li...@gmail.com> wrote:

>That’s really interesting. Currently in Royale, we’re using browser
>methods to parse XML, so the entire tree is parsed into a DOM tree at
>once.
>
>I wonder if that’s something that we can/should optimize…
>
>Harbs
>
>> On Feb 15, 2018, at 10:40 PM, Alex Harui <aha...@adobe.com.INVALID>
>>wrote:
>> 
>> It also turns out that Flash lazily parses XML, so when the XML arrived
>>as
>> a String from the server, Flash only converted the top-level tags into
>>XML
>> nodes and just remember the strings of tags for SalaryHistory.
>

Reply via email to