4 Replies Latest reply on Oct 21, 2009 7:38 AM by capuman

    Flex itemrenderer recycling


      Hi guys,


      i have a big performance issue which i need to sort out as soon as possible.


      I'll describe the scenario first.


      I have a datagrid which takes in data from blaze, basically everytime there is a transaction going through our system a message is sent to Blaze with the transaction information which is then displayed in the datagrid.

      This is working absolutely fine, however there are filters which the user can apply to the datagrid which change the colour of the row/columns/font style etc depending on certain conditions, this is done via item rendrers (stuff like if amount of transaction is > 100 make row red, if country of transaction is UK make column green etc)


      This is also working well, however the problem i have is when the user has many rows and columns.


      By default the user has about 20 rows on display and abount 5 or 6 columns on display at any one time (although the datagrid has many more). When the user scrolls up to show the next bunch of rows or scrolls right to show the remaining columns the performance is really really slow.


      From research that i have been doing i understand that Flex basically 'renders' the viewable rows/columns plus 2 more (so if you have 20 rows in total, but you only have 10 in view, Flex will render 12, so when you scroll down theres some buffer).


      However in my case, this is not good enough because there are so many columns and rows, and there can be so many filters applied at once that when you start scrolling the performance takes a massive hit. In my case it would be better if flex would 'render' all of the columns and rows whether they are visible or not.


      So basically my question is, is there a way to change how many rows/columns Flx pre-renders so that its more than just 2 more than whats currently visible? I understand that if that were to happen, the inital loading of the data in the grid would take a massive hit, but id rather have a bigger inital loading time than a bad user experience whilst scrolling.


      thanks in advance!!