# My Data Viewer List/Grid is extremely slow

**URL:** <https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533>\
**Category:** Questions about Thunkable X\
**Created:** [October 25, 2022, 8:25pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533 "2022-10-25T20:25:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)\
**Post date:** [October 25, 2022, 8:25pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/1 "2022-10-25T20:25:05Z")

</div>

Hi there,

I want to make a calendar app, so I need to display the days in a specific month. I would like to display the days in a Data Viewer Grid, so the user can select the appropriate one.

However, Thunkable updates the values in a Table Data Source extremely slow.

Method 1 I tried: (took 23 seconds to load by creating new rows)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/001a371e9af00fd46fb61188dc32939edf9b8fb3.png)

I have also tried the DVL hack from @jared, but it got even slower.

> [@Fun Share: DVL Hack](https://community.thunkable.com/t/fun-share-dvl-hack/1665645):
>
> I wanted to share a DVL hack shared by a user via Intercom. I have assembled a simple example [here](https://x.thunkable.com/projectPage/61d4b480e9a87c04cc3d1c9d) tldr; You can bind a DVL to a blank table with a lotta rows. Set the empty string text to “”. Then loop through the list of table ID’s and assign DVL components properties without ever dumping data into the table! AMA! Can’t wait to see what you all can thunk up with this special sauce!

Method 2: (This way, it took 24 seconds to load. ☹ )

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/b/3b05dbe866a4fc6c68821d48d59126f7633d5f15.png)

The days in my calendar are loading extremely slow:  
(Here you can see that the app creates the rows one by one, but I need 31 of them to create a whole month, so it takes a lot of time.)  
 ![ezgif.com-gif-maker](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/c/cc1a7cb0fbc0fd2289db525c422f2799d1f2656c.gif)

I read in the community, that other thunkers have the same issue as well:

> [@DataViewerList speed testing](https://community.thunkable.com/t/dataviewerlist-speed-testing/1841281):
>
> Hello Thunkers ! Sometimes an application needs to dynamically build, populate and display a local table on the screen. And I noticed that doing so, DVL become slow in showing results. So I made a simple app to exemplify that, building a table with only 30 rows/9 columns with no other beautify than changing every row color. And still for that it requires more than 10 seconds to display it (on a real fast phone, a Qualcomm Snapdragon 888 Octa-core RealMe GT edition). This is the link to app, …

Does anyone have a workaround for this or is Thunkable planning to make tables faster?

Thank you!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 25, 2022, 8:54pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/2 "2022-10-25T20:54:07Z")

</div>

In Method 1, you are:

1. Calling an API and waiting for the response
2. Looping through a list using a stored variable
3. Creating rows in a data source

Each of those is a slow-ish process. But there are some things you can do/consider:

1. How long does the API response take? I once used an API that took 12-20 seconds to respond. I thought for sure Thunkable was just really slow to update data from cloud sources until I realized that the 16 seconds it was taking included about 14 seconds waiting for the API. Each API (and specific call) will be different in this regard.

2. Read/write using stored variables is SLOW. Any time you need to access or save a value with a stored variable, do this instead: set an app variable to the stored variable’s value. Use/update the app variable as needed. At the end (e.g. **outside** of a loop), set the stored variable to the app variable’s value.

3. Creating rows can take a while especially if you’re creating dozens or hundreds of rows (how many are you creating on average?). Consider using a faster method such as Firebase (really fast!) or Google Apps scripting.

For Method 2, I would make your code more efficient by replacing all of the repetitive list blocks with variables. So for example, you have `in list app variable ready get # i` **six times**. Instead, when the loop starts, set a variable to that value (`in list app variable ready get # i`) and then use the variable in those six places in your code. I can’t say how much that will speed things up – maybe just a little – but it should be faster to get a value from a variable over and over than to get a list item over and over. And again, you’re using three stored variables. Fortunately, they aren’t in a loop. But each time you call the API, it has to make three retrievals of stored values. So instead, when the screen opens (for example), set app variables to those stored variable values and use the app variables inside the function instead.

Another option, which you may have already thought of, is to clone blocks instead of using a DVL. That tends to be faster and gives you a lot of control over the look of the “DVL.”

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [October 26, 2022, 1:09am UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/3 "2022-10-26T01:09:12Z")

</div>

check this out!  
[https://x.thunkable.com/projectPage/6358829b13bd2c31d1f0fbc6](https://x.thunkable.com/projectPage/6358829b13bd2c31d1f0fbc6)

My calendar project is fast af using a layout component and a JavaScript library to produce the dates.

---

<div class="post-metadata">

**Author:** ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)\
**Post date:** [December 6, 2022, 9:35am UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/4 "2022-12-06T09:35:11Z")

</div>

Thank you for the answers and sorry for my late response.

I created a smaller project to present my problem, because it is not related to the API, stored variable or the number of the rows like @tatiang suggested.

I have 4 examples on how the Data Viewer List/Grid gets slower and slower. I hope that it can help the team to debug the issues in Thunkable and fix this.

Project link: [Thunkable](https://x.thunkable.com/copy/f93a5212a17c390136fda992d9a62120)

**Example 1:**  
I just create a table without any Data Viewer on the screen. It took: **0.16 seconds** for me. I think that should be the optimal.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/4/1419ea3d29b04a2c6d87e29a18582d4c83b1631c.png)

**Example 2:**  
Creating the same table, but in this case I have a Data Viewer Grid on my screen without any Data Bidings. It took **1.26 seconds** for me. I mean I could live with that, but it even get worse in the next example and it is a more than 7 times slower than in example 1.

 ![IMG_FA0C55133758-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/f/dff0f7daf7eebad4ea2f2b7763fae255b846cad8.jpeg)

**Example 3:**  
In example 3, I had the same table, the same DVG, but now I had Data Bidings. It took **2.96 seconds** to load, which is more than 18 times slower than example 1.

 ![IMG_CD46F295A367-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa4a483a80c87978455e33e26f1826d17db0e2fa.jpeg)

**Example 4:**  
In this example I changed the code a little bit, I added a simple if block inside the loop, and I got **4.82** , which is extremely slow and is **30 TIMES SLOWER** than in example 1.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/f/afef5edf99dbbb238e604544ca18cb2360ef5d9a.png)

I understand, that it should load slower, because displaying the items in the Grid, but this is too slow, waiting 4-5 seconds to display a calendar like I want to is extremely slow.

I don’t want to clone blocks as @jared suggested, because my Data Viewer Layout contains more components and detecting a click event for all of them would be impossible. Or do you have an idea how the click event for a column like this should like?

![IMG_AE1BC86383F1-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/3/e3e60bbd95a414e547d3cb8414c65c36727f14fc.jpeg)

Thank you again for your time and answers and I hope that [@Thunkable\_Staff](https://community.thunkable.com/groups/thunkable_staff) will have a look on this.

---

<div class="post-metadata">

**Author:** ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)\
**Post date:** [December 6, 2022, 9:44am UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/5 "2022-12-06T09:44:54Z")

</div>

The results in my previous post was from my iOS device. Testing the same app on an Android device results:

Example 1: **0.69 seconds**  
Example 2: **4.84 seconds**  
Example 3: **9.37 seconds**  
Example 4: **14.36 seconds**

So in Android the situation is even worse. Live apps and built apps produce the same results. In bigger projects it even gets worse like in the main post:

> [@skulamester](#):
>
> took 23 seconds to load by creating new rows

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 6, 2022, 5:39pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/6 "2022-12-06T17:39:13Z")

</div>

It took 5 seconds on an Android device to just display a DVG?! How many rows does that data source have?

Is it taking that long because as you scroll down, the data isn’t visible until you wait a little and then scroll down again and then wait…?

---

<div class="post-metadata">

**Author:** ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)\
**Post date:** [December 6, 2022, 7:14pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/7 "2022-12-06T19:14:41Z")

</div>

The local table data source speed issue has been comented on several times over the last few years including by myself in March 21, [Local Data Source Table very slow](https://community.thunkable.com/t/local-data-source-table-very-slow/1134582)  
I have very recently revisited the DVL combined with Local table and discovered the speed isuue is still present.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 6, 2022, 8:05pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/8 "2022-12-06T20:05:12Z")

</div>

So the faster alternatives are to use Firebase or the Airtable API. Unfortunately, both of those require you to use clones instead of the built-in data sources. I do think this is a problem Thunkable should fix - if they can. We really should be able to rely on the DVL/DVG as is.

---

<div class="post-metadata">

**Author:** ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)\
**Post date:** [December 8, 2022, 10:39am UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/9 "2022-12-08T10:39:16Z")

</div>

> [@tatiang](#):
>
> It took 5 seconds on an Android device to just display a DVG?! How many rows does that data source have?

Yes it took 5 seconds. However, I think that it depends on the phone’s performance, because on an Galaxy S8+ (with screen recorder turned on) it took **9+ seconds** to display **30 rows** (I display 30 rows because I want to make a calendar app):  
 ![20221030_095327](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/4/74990cd4fae63507bc1efdc0de317bf68634a568.gif)

However, on my **iPhone** , it is **1.35 seconds** , which is still very slow regarding that it is just **Example 2** meaning this is an empty Data Viewer with **no Data Bidings**.  
 ![RPReplay_Final1670493947-7](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/1/610a656bab34cbab82aea003adfe1aaecbf4463e.gif)

If I am testing Example 3 (meaning **I have Data Bidings** ) it is very slow, **3.17 seconds** :  
 ![RPReplay_Final1670494843](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/e/9e7be26d156a9989a1df54b8139f708042a913c9.gif)

On **Android** , the same test without a screen recorder is **9.37 seconds**.

I tested Drag and Drop and Snap to Place UI’s too.

> [@tatiang](#):
>
> Is it taking that long because as you scroll down, the data isn’t visible until you wait a little and then scroll down again and then wait…?

No, it is not depending on the scrolling on my phones, but you could test it on your phone and show me your results, here is the link to the project:

> [@skulamester](#):
>
> Project link: [Thunkable](https://x.thunkable.com/copy/f93a5212a17c390136fda992d9a62120)

> [@martint](#):
>
> The local table data source speed issue

Yes, It could be not because of the DVL, there **might be something wrong with Local Table** data source.

> [@tatiang](#):
>
> use Firebase or the Airtable

Unfortunately, that cannot be the case in my situation.

> [@tatiang](#):
>
> Thunkable should fix

I really believe that it could be fixed, because it is **easy to reproduce**. I am developing a calendar-like app right now and want it to release in the coming months, but **with a such a slow Local Table my app is be unusable.**

I hope that @conroy33 ot [@Thunkable\_Staff](https://community.thunkable.com/groups/thunkable_staff) could look into this, so I can finish my app, buy a Pro Plan and publish it.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 8, 2022, 12:54pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/10 "2022-12-08T12:54:20Z")

</div>

That’s whack. I’d use the layouts component. I have already shared how to build a calendar using it.

> [@Fun Share: Calendars in Thunkable](https://community.thunkable.com/t/fun-share-calendars-in-thunkable/1681878):
>
> Here’s a calendar that’s made using the Luxon javascript library, the web viewer, and a DVL. There’s several ways to bring a calendar into your app now! check it out! you may need to view this on a mobile device for propper formatting! [project page](https://x.thunkable.com/projectPage/6358829b13bd2c31d1f0fbc6) \*\*\* updated link ^^^^ \*\*\*

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [March 8, 2023, 12:55pm UTC](https://community.thunkable.com/t/my-data-viewer-list-grid-is-extremely-slow/2098533/11 "2023-03-08T12:55:17Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
