Big (Infinite) List and Table Data Management

Questions and information about Crank Software's Storyboard Engine

Moderator: jamiev

Big (Infinite) List and Table Data Management

Postby thomas » Wed Dec 21, 2016 11:56 am

We've had a number of customers who have asked us about how to manage large data samples that they want to display in Storyboard tables. The first (naive?) approach is always to attempt to map the data in directly to Storyboard table cells and then just resizing the table to match the desired size. This approach can work well for small large numbers, but isn't really practical when you want to load in either an infinite number of elements or potentially thousands or tens of thousands of events as the engine is going to use your table size as a hint and try and allocate some backing store memory for those cells ... even if they will not be drawn onscreen immediately.

Instead of doing this direct table mapping, we suggest a layered approach where you have a data accessor function that uses the table as a window onto a large data set and then just manipulates the Storyboard data variables behind the scenes to provide a 'window on a window on the data'. We don't provide this within the generic table because there may simply be too many different ways that you want to customize it, but rather we're happy to share a sample implementation that you can customize to your own wants and needs.

Thomas
Attachments
InfiniteList.zip
(157.22 KiB) Downloaded 48 times
thomas
 
Posts: 127
Joined: Mon Nov 02, 2009 4:32 pm
Location: Ottawa

Re: Big (Infinite) List and Table Data Management

Postby MikeMarchand » Wed Dec 21, 2016 3:42 pm

Here is an updated version of the Infinite List sample posted by Thomas. A bug was fixed where reaching the bottom of the list would have unexpected behavior. The sbt_infinite_list.lua script in this sample is more flexible than the original, it is able to work with tables that have more than one row.
Attachments
InfiniteList2.zip
(157.49 KiB) Downloaded 52 times
MikeMarchand
 
Posts: 17
Joined: Wed Jan 21, 2015 3:33 pm

Re: Big (Infinite) List and Table Data Management

Postby Uwe_D » Mon Sep 04, 2017 2:09 am

The Infinite List project works fine!
Now i try to use the Infinite List in my own project. Can you tell me who is fiering the sync_list event?
Uwe_D
 
Posts: 2
Joined: Fri Sep 01, 2017 2:34 am

Re: Big (Infinite) List and Table Data Management

Postby Uwe_D » Tue Sep 05, 2017 8:39 am

Problem solved.
Uwe_D
 
Posts: 2
Joined: Fri Sep 01, 2017 2:34 am

Re: Big (Infinite) List and Table Data Management

Postby MikeMarchand » Wed Sep 06, 2017 2:52 pm

Here's an explanation for anyone else who is wondering where the sync_list event is generated. In the Variables View, the column on the right is 'Event', this event is generated when that variable changes. In the case of "Layer.InfiniteList.grd_yoffset", it generates sync_list when it is modified. This means that everytime the table is scrolled, we are generating the sync_list event.
MikeMarchand
 
Posts: 17
Joined: Wed Jan 21, 2015 3:33 pm


Return to Storyboard Engine

Who is online

Users browsing this forum: No registered users and 1 guest

cron