Thanks Alex. 
It is very useful or me also. I am in same scenario because i have created a
custom grid that is being used in many pages of my project. columns and data
are created in runtime as well. although i have created lightwet renderers
to get optimize performance. but few things i learned here in your post are
very useful.
Thanks again :)

sachin dev Tripathi
[email protected]


Alex Harui wrote:
> 
> I don’t have any particular links to recommend.  Everything else is
> standard optimization techniques.  Make sure your renderers have as few
> children as possible and are based on the lowest level class you can find. 
> It is easy to use Canvas, Hbox and Vbox and many of our examples do, but
> they are very heavy and inefficient if you have lots of them on screen. 
> None of the Flex default renderers are based on containers for that
> reason.
> 
> 
> On 3/23/10 8:45 AM, "fusionpage" <[email protected]> wrote:
> 
> 
> 
> 
> 
> 
> Thanks Alex.  This is very helpful and exactly in the direction of what
> I'm seeking to understand.  I appreciate it.
> 
> Have any recommended resources to learn more?
> 
> Thanks,
> Don
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com> ,
> Alex Harui <aha...@...> wrote:
>>
>> It doesn't matter if you add columns at run-time or not.  The main factor
>> is how many column you are displaying and how many rows will be
>> displayed.  And note that is different from the total set of columns that
>> could be displayed and total number of data items:
>>
>> Example:  I have a 10000 person database with 100 different statistics on
>> each person.  I set up my DataGrid to have 100 columns representing each
>> statistic, but because it won't fit on the screen I set
>> horizontalScrollPolicy="true".  Still, the DG is likely to be full screen
>> so it can show about 20 columns and 30 rows.
>>
>> Note that if do not set horizontalScrollPolicy="true", the DG will cram
>> all 100 columns on screen.  This makes a significant difference.  Instead
>> of 20x30=600 renderers, it is 100x30=3000 renderers.  The DG will take
>> more than 5 times longer to set up and render 3000 renderers instead of
>> 600 renderers, memory usage will go way up, and even things like mouse
>> tracking and CPU utilization at idle time will be impacted.
>>
>> The next important thing to remember is that DG has a very generalized
>> update mechanism.  If it detects a change to any of the 10000 person
>> records, it will refresh "all" of the renderers on the screen.  It does
>> not optimize for whether that renderer is associated with that data item
>> because labelFunctions and custom renderers make it possible for any data
>> item change to affect every renderer.  This is very inefficient, but we
>> have to be this conservative otherwise your renderers could miss updates.
>>
>> This is important in how you setup and maintain your dataProvider.  A
>> common mistake I see is to take some XML, make a new ArrayCollection, and
>> loop through the XML creating Person records and using push/addItem to
>> add it to the ArrayCollection.  Every time you do that, the AC generates
>> a change event, and if the DG is already bound, it is going to try to
>> refresh all of its renderers.
>>
>> So, aggregate changes.  If you are converting XML, make an array, convert
>> items and push them on the array and then set the whole array into the
>> ArrayCollection's source.
>>
>> HTH,
>>
>>
>> On 3/22/10 4:28 PM, "fusionpage" <fusionp...@...> wrote:
>>
>>
>>
>>
>>
>>
>>
>> Does anyone have any tips or tricks, in general, about optimizing the
>> Flex client for best performance in populating/rendering large datasets
>> in an AdvancedDataGrid?
>>
>> I'm specifically NOT asking about improving the server-side.  I'm trying
>> to understand what the factors are on the Flex client-side that impact
>> how fast data loads/renders into an ADG, when the columns use in-line
>> itemrenderers and/or the columns are added at run-time.
>>
>> Are there any significant difference in performance when comparing
>> different design patterns or ways of generating the datagrid? e.g. does
>> it matter if it generated via pure AS3, or if you use MXML? Is
>> performance the same no matter which design pattern one uses?
>>
>> Assume the data is loading via a RemoteObject call.  In my case via a
>> ColdFusion CFC.
>>
>> Any tips, tricks, or links so I can learn more?
>>
>> So, far, in my experience, most of the performance issues come from the
>> server-side, but I may be ignorant on the impact of the design on the
>> Flex side.
>>
>> Thanks,
>> Don
>>
>>
>>
>>
>>
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe System, Inc.
>> http://blogs.adobe.com/aharui
>>
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
> 
> 

-- 
View this message in context: 
http://old.nabble.com/DataGrids-with-large-datasets-Tips---Tricks--tp27994256p28012708.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to