How can I optimize performance in large projects (2000+ blocks)

Hi Thunkers !,
In general, how to avoid hanging issues when app becomes more complex ( more than 2000+ blocks ! ) ?
as I’m making a very complex app and I don’t want to struggle these problems specially with the not so powerful mobile devices !
so what can I take in consideration when building an app like that ?
Thanks Thunkable for your great efforts !

Hi, @davidsobhysabetb! :wave:

To avoid hanging issues, just reduce the number of blocks. This can be easily done through “Any Components.”

You could post your blocks here, and we’ll be glad to help you reduce them.

Thanks! :blush:

Thanks for your reply @kartik14 !
So, is that the only thing to have in consideration ?
blocks number is the responsible of app performance ? so what if using any components didn’t reduce the number of blocks too much let’s say the 2000 blocks became 1500, is then the large blocks number still a problem ?

Blockquote You could post your blocks here, and we’ll be glad to help you reduce them.

actually I didn’t start building this app yet I need to know if it would be possible with at least nice performance with that number of blocks possible or not !
Thanks !

Are you satisfied with the speed of this project with 1200 blocks?

https://x.thunkable.com/projects/5d9310fcdf0a8f208bd2bb11/project/properties/designer/

1 Like

Hey @davidsobhysabetb - just wondering if you are having issues using Thunkable to create this app, or if the app itself is crashing on your users devices? It’s a little unclear because you also mention:

…so, I’m not sure what has prompted you to ask this question?

We recently release an update that massively improves the performance of the blocks editor for larger projects.

Thanks.

1 Like

Thanks a lot for your reply @actech I have a crash issue in your app using Thunkable live iPhone XS Max but working great and smoothly in iPhone 5s

Hi @domhnallohanlon , Thanks a lot for replying !
I’m building an app ( complex app ) and by now everything’s OK , but my app now 3670 blocks in total like in average 800 blocks per page and I noticed that performance get slower when adding more features to my app, this issue more happens with android devices and not very high IOS devices like ( iPhone 5s )
performance get slower but i think it’s acceptable that’s why I’m asking how to manage my app to deal with this large number of blocks without issues … Here’s the project I’m building … try it
https://x.thunkable.com/projects/5e30234c4cf411ea25aff47c
Thanks a lot !

1 Like

Hey @davidsobhysabetb, my big project currently has about 4000 blocks. I use an iPhone 11. I’ve seen it ran on older androids and it’s roughly the same speed as mine.

I have used a lot of functions and the “any component” blocks

Start by looking for code that repeats itself! Then, figure out how to not have to make it repeat over and over

I think my app slows down the most what I’m trying to paint something onto the screen after the screen has already been displayed for example. In one of my screens I have 25 buttons five rows with five buttons and each and any given time I want one of each of those five buttons colored yellow and the rest green depending on what settings the user has. When I ask the app to automatically paint the buttons upon loading the screen or after making changes the app slows down only while coloring the buttons, however if I don’t have any green painting going on then there’s no issue.

2 Likes

Hi @jgibb20189, Thanks for your reply
May I try your app on my iPhone 5s to compare the performances of the two apps ?
Thanks .

Interesting, thanks for flagging this. Can you tell us a bit more about the features that you think might be causing the lag? This will help us to investigate further.

When you say “features” does this mean adding in new UI components? are you doing async stuff like working with APIs? or is it simply a matter of having more blocks/functions in your project? Please bear in mind that using blocks like the wait block will cause your app to slow down, as this is what they’re designed to do!

1 Like

Hi, @domhnallohanlon,
Yes I mean using more blocks and more pages and yes I’m using wait block but time is only 1.5 sec max at specific condition only .

Does you app happen to “lag” a bit when this condition is met?

1 Like

App hanging even with pages with no wait functions ( iPhone 5s )
and great performance in ( iPhone XS Max ) @domhnallohanlon
Thanks for you support .

1 Like

No problem at all - just want to make sure that everyone has the best possible experience with Thunkable.

Probably should have asked this sooner, but is this lag when using Thunkable Live or are you installing your apps directly on to your devices?

2 Likes

I tried both with the same result @domhnallohanlon

Might just be a hardware issue @davidsobhysabetb?

I actually locked myself out of my 5s, but if you DM me your project link I’ll see if I can get it up and running again tomorrow?

1 Like

I don’t think it’s a hardware issue as I tested my app on medium android mobile and there’s a little lag too .
that’s my project
https://x.thunkable.com/projects/5e30234c4cf411ea25aff47c
@domhnallohanlon

1 Like

ok, last question - what version of iOS are you running on your 5s?

12.4.5 @domhnallohanlon

1 Like

I’m using a bottom tab navigator and it has 5 pages, but I’m also having 3 pages which doesn’t belong to any tab navigator … maybe that’s what making the lag ? @domhnallohanlon