phpapache-flexflex4flex3

Accordion flickers when refreshed


I have an accordion which contains a repeater. That repeater takes an array as a dataprovider. The array in turn gets data from an XML file, on server, via HTTPService.

Now, data in the XML file gets modified after sometime frequently so I send the HTTPService after every 5 secs by using a Timer.

Problem: When the timer timesout after 5 secs, HttpService is sent, data is retrieved and showed in accordion but each time this happens, the accordion flickers. Thus, the flickering happens every 5 sec which is quite irritating.

Can I somehow remove the flickering to make the accordion update seamlessly? If it's the problem with accordion, will it persist if I use a DataGrid in place of accordion?


Solution

  • Flickering is often an indication of a low framerate and is not specific to one type of component. Without any code its difficult to know what you are doing wrong but I suspect that you may be processing too much XML all in one frame and using the Repeater component incorrectly.

    A Datagrid should be able to handle very large amounts of data without the flickering issue since it only renders the few rows that are currently visible on the user's screen.

    A repeater has very few performance optimizations built into it. If you need to repeat large amounts of components (more than 20) then you should be using either a DataGrid or List.