This project is read-only.

Support for dynamic data

Jan 25, 2008 at 12:13 AM
It may become clearer as I begin integrating this control, but how well is dynamic data supported? Each row in my application will have some fields that can change often and somewhat rapidly. (i.e. every 3 to 12 seconds). Do you have a recommended approach? It seems like a bad idea to let the user sort on a fast-changing data field, for example. But even if I limit in this manner, is there a way to update the text for only the rows that have changed?

Some java grid controls I've used in the past used an MVC pattern, so that the view was notified as to which specific data items were changing. If the item was collapsed, it was smart enough not to redraw. The overhead to this approach was that my data items had to implement the tree or grid control's item interface.

Jan 27, 2008 at 4:20 PM
Hi Ken,
If an item has changed the only current way to let the list know something has changed is to remove and re-add the changed item(s). Now this isn’t as bad as it sounds, this won’t cause the list to re-sort all the items within it as it already knows that the current items held within it are already sorted so it does a binary search / insert on the new item(s).

The second stage in updating is the whole list is scanned to determine what if any groups have been created or removed; an internal list is then updated with this information. This is quite a quick operation.
Finally the visual items (Sections) are then created and the list is painted. The only visual items that are created are the visible ones, so say if you had 10,000 items and only enough room for 10 rows to been seen by the user then 10 RowSections would be created. Again this should be a pretty quick operation as well.

If I were you I would knock up a little test application allow grouping / sorting on your columns and test the lists speed against some realistic number of rows / data and changes you’re expecting. Then see how Superlist performs; if there’s a speed problem then send me the test and I’ll have a look for you.