I don’t know of any links off-hand.  I would simply create a class with the set 
of properties you are interested in, then take the XML and parse it into 
instances of that class.

You can try to get XMLDecoder to do it, but sometimes it is more efficient just 
to write your own converter.


On 4/29/10 7:50 PM, "Angelo Anolin" <angelo_ano...@yahoo.com> wrote:






Any link to show us some samples?

My data is coming from a .NET backend and most of it are in XML format and 
parsed into XMLListCollection.

Would appreciate some more info on this.

THanks.

________________________________
From: Alex Harui <aha...@adobe.com>
To: "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com>
Sent: Wed, 28 April, 2010 21:49:52
Subject: Re: [flexcoders] XMLListCollection DataGrid Performance vs Any Other 
DataProvider Type




Convert the XML to Class instances.


On 4/28/10 10:06 AM, "jamesfin" <james.alan.finnigan @gmail.com> wrote:






Here's the scenario...

Simple datagrid with XMLListCollection data provider.

Average collection size is 200 rows of XML (shown below)

10 columns in the datagrid with a unique item renderer for each.  1 Column can 
display 1 of 10 embedded images depending on an xml attribute.

AS3-only Renderers are highly optimized.

Average visible rows = 30 (simultaneously visible rows / meaning at least 300 
renderers being recycled when scrolling?

Typical XML row data

<foodata fooid="4997" fooid2="0" fooid3="2909" foot="9" startdate="2010-04-09 
13:45:00" enddate="2010-04-09 14:45:00" foost="1" fooname="New Foobar" 
foosub="More Foobardata" fooloc="false" fooonly="false">
</foodata>

When all said and done being loaded, vertical scrolling is noticeably slow on a 
new iMac (Safari or Firefox with latest FlashPlayer) compared to a stripped 
down non-XML data provider version which scrolls quickly.

Googling consensus shows that XMLListCollection is not the optimal dataprovider 
in this scenario and that XML in general is not the best choice if it can be 
avoided.

Can anybody shed any light on a better way to improve scrolling performance 
based upon this scenario?

Thanks in advance.






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to