Re: [flexcoders] Re: dataGrid effciency
thank u, other problem puzzle me, when the dataGrid's data changing and it will refresh itself. if i drag scrollbar to a position,after the dataGrid refresh the scrollbar will go to top of dataGrid. From: Tim Hoff [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, November 19, 2008 2:36:08 PM Subject: [flexcoders] Re: dataGrid effciency Hi, The biggest performance culprits with a DataGrid, or any of the ListBase components, is the itemRenderers and the size of the dataProvider. You can optimize the itemRenderers by using UIComponent; see Alex's blog. And depending on how many items are in the dataProvider, you could see performance issues there as well. If you are performing any calculations you might look at ways to tighten up the code. With a one second refresh, you might be asking too much of the UI. -TH --- In [EMAIL PROTECTED] ups.com, Fu Di [EMAIL PROTECTED] wrote: hi everyone, i used dataGrid to display a list of real time data. when i finished it, i found it is slow. the DataGrid has 13 DataGridColumns, every column almost nest a ItemRenderer. i had to do this to meet the requirements of pattern. the data update every second, and i need to change the components¢ style in some columns following the data. as i know these two aspects will cost large calculation. who konws how to optimize it or other ways to achieve. thanks
Re: [flexcoders] Re: dataGrid effciency
You can remember your last index of the scroolbar and use scorllToIndex(index : int) after the refresh. HTH, Claudiu From: Fu Di [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, November 19, 2008 11:03:39 AM Subject: Re: [flexcoders] Re: dataGrid effciency thank u, other problem puzzle me, when the dataGrid's data changing and it will refresh itself. if i drag scrollbar to a position,after the dataGrid refresh the scrollbar will go to top of dataGrid.. From: Tim Hoff [EMAIL PROTECTED] com To: [EMAIL PROTECTED] ups.com Sent: Wednesday, November 19, 2008 2:36:08 PM Subject: [flexcoders] Re: dataGrid effciency Hi, The biggest performance culprits with a DataGrid, or any of the ListBase components, is the itemRenderers and the size of the dataProvider. You can optimize the itemRenderers by using UIComponent; see Alex's blog. And depending on how many items are in the dataProvider, you could see performance issues there as well. If you are performing any calculations you might look at ways to tighten up the code. With a one second refresh, you might be asking too much of the UI. -TH --- In [EMAIL PROTECTED] ups.com, Fu Di [EMAIL PROTECTED] wrote: hi everyone, i used dataGrid to display a list of real time data. when i finished it, i found it is slow. the DataGrid has 13 DataGridColumns, every column almost nest a ItemRenderer. i had to do this to meet the requirements of pattern. the data update every second, and i need to change the components¢ style in some columns following the data. as i know these two aspects will cost large calculation. who konws how to optimize it or other ways to achieve. thanks
RE: [flexcoders] Re: dataGrid effciency
First, make sure you need a datagrid. Do you need resizable, re-orderable, sortable columns? If so, you need DataGrid. If not, consider a List with a single itemRenderer. Then, try to avoid re-asigning the entire dataProvider, but instead use the collection API to update only the itemss/properties that have changed. Of course this will require some logic. That will prevent the reset of the scroll position, and should help with the performance. Depending on your requirements there might be other solutions as well, such as a paged repeater. A 1 second refresh requirement demands serious design consideration. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of claudiu ursica Sent: Wednesday, November 19, 2008 4:26 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: dataGrid effciency You can remember your last index of the scroolbar and use scorllToIndex(index : int) after the refresh. HTH, Claudiu From: Fu Di [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, November 19, 2008 11:03:39 AM Subject: Re: [flexcoders] Re: dataGrid effciency thank u, other problem puzzle me, when the dataGrid's data changing and it will refresh itself. if i drag scrollbar to a position,after the dataGrid refresh the scrollbar will go to top of dataGrid.. From: Tim Hoff [EMAIL PROTECTED] com To: [EMAIL PROTECTED] ups.com Sent: Wednesday, November 19, 2008 2:36:08 PM Subject: [flexcoders] Re: dataGrid effciency Hi, The biggest performance culprits with a DataGrid, or any of the ListBase components, is the itemRenderers and the size of the dataProvider. You can optimize the itemRenderers by using UIComponent; see Alex's blog. And depending on how many items are in the dataProvider, you could see performance issues there as well. If you are performing any calculations you might look at ways to tighten up the code. With a one second refresh, you might be asking too much of the UI. -TH --- In [EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com , Fu Di [EMAIL PROTECTED] wrote: hi everyone, i used dataGrid to display a list of real time data. when i finished it, i found it is slow. the DataGrid has 13 DataGridColumns, every column almost nest a ItemRenderer. i had to do this to meet the requirements of pattern. the data update every second, and i need to change the components¢ style in some columns following the data. as i know these two aspects will cost large calculation. who konws how to optimize it or other ways to achieve. thanks
[flexcoders] Re: dataGrid effciency
Hi, The biggest performance culprits with a DataGrid, or any of the ListBase components, is the itemRenderers and the size of the dataProvider. You can optimize the itemRenderers by using UIComponent; see Alex's blog. And depending on how many items are in the dataProvider, you could see performance issues there as well. If you are performing any calculations you might look at ways to tighten up the code. With a one second refresh, you might be asking too much of the UI. -TH --- In flexcoders@yahoogroups.com, Fu Di [EMAIL PROTECTED] wrote: hi everyone, i used dataGrid to display a list of real time data. when i finished it, i found it is slow. the DataGrid has 13 DataGridColumns, every column almost nest a ItemRenderer. i had to do this to meet the requirements of pattern. the data update every second, and i need to change the components¢ style in some columns following the data. as i know these two aspects will cost large calculation. who konws how to optimize it or other ways to achieve. thanks