Any tips to avoid too many blocks within Screen Initialize Event?

Components on my home screen loads very slowly. I assume it’s because I have too many blocks within the screen.initialize event. Any tips to avoid this issue ? I have no idea where else I place them.

The ‘Responsive Sizing’ procedure has the most number of blocks (like 1000) :no_mouth:

That’s a massive number :exploding_head:

You might want to show it to us as well.

I suggest you to use Dynamic components Extension to reduce blocks

Loops are also useful :wink:


Yeah that is also good idea to reduce blocks

I use Dynamic components extension with Schema to create “n” number of components using single blocks


@WatermelonIce @gopi Even if I replace them with loops it will still be slow na ? Cause the Screen.Initialize event has to do the same number of activities/procedures na ?

@mikkupoocha is your app is dynamic?

No… my app is a quiz app with levels & locking system. So dynamics component won’t work for me. But there are some blocks that can be replaced with loops. But im confused since the Screen.Initialize Event has to do the same number of actions even if we reduce the number of blocks.

You’re wrong anything can be possible by using dynamic components extension. All you need is logic

May be you can try async procedure extension

I didn’t mean ‘impossible’. In my case, it will make it complicated & I have to re-do everything.

Btw these are the blocks that slows down the component loading time.

There’re like 1000. The Screen.Initialize Event has to do a lot of work when the user’s mobile is not “360x640”.

This is how my problem looks like.
It takes a while for the Responsive sizing blocks to execute. So we can clearly see it’s original dimension first & it then get resized according to the code.
Note: I was able to reduce the number of blocks using the ‘for each item in list loop’. But still the same result cause the number of actions the Screen.Initialize block has to do is the same.

I sugest you to make a loading screen while the blocks are loading.

The loading concept will only look good for the splash screen. This one is the main screen.

Btw I have already used a loading screen for the questions & answers to load (It’s actually a multiple choice quiz app).

I was able to remove/reduce the white screen issue using 2 timers like this. Both have their duration set to “0”. But I can still see the components getting resized. Just a glimpse. Still, I can’t say it’s a solution. There must be even better ways to do this.

Note: This issue can be fixed by deleting the splash screen & placing everything on a single screen. But then the problem will be the cold start white screen (It will stay longer). So the thing is that fixing one will cause other problems :unamused:

Will this issue have anything to do with Resolution & Pixel Density ?
I tested like 10 devices now. Not all of them have the same issue.

The ones that has this issue:

  1. 1080 x 2280 pixels, 19:9 ratio (~432 ppi density) - Nokia 6.1 Plus
  2. 1080 x 2340 pixels, 19.5:9 ratio (~395 ppi density) - Poco M2
  3. 1080 x 2400 pixels, 20:9 ratio (~395 ppi density) - Poco X2
  4. 1080 x 2340 pixels, 19.5:9 ratio (~409 ppi density) - Realme 2 Pro
  5. 1080 x 2340 pixels, 19.5:9 ratio (~395 ppi density) - Redmi Note 9
  6. 720 x 1600 pixels, 20:9 ratio (~270 ppi density) - Vivo Y20i

The ones without issues:

  1. 1080 x 1920 pixels, 16:9 ratio (~401 ppi density) - Redmi Note 4
  2. 720 x 1280 pixels, 16:9 ratio (~294 ppi density) - Redmi 4
  3. 1080 x 2340 pixels, 19.5:9 ratio (~394 ppi density) - Realme X
  4. 1080 x 1920 Pixels, 16:9 ratio (~ 424 ppi density) - Huawei GT3
  5. 720 x 1600 pixels, 20:9 ratio (~270 ppi density) - Oppo A31
  6. 720 x 1440 pixels, 18:6 ratio (~268 ppi density) - Moto E5 Plus

It has already been a week since I posted this issue.

I did my best to find a solution. But it still remains unsolved. So I now offer a reward. It’s not much, but this is all I could offer now.
The first to come up with a permanent solution to my issue gets a $10 reward.
Even if you are willing to create an extension for this, you will also have to explain the logic & the reason why it’s happening on certain devices only.

Note: You may have to check the linked topic & comments to understand my actual problem. The topic also contains a video. You can PM me if you have any other doubts.

This is a real bulky number to handel with a single event (at once). You can disable all these procedures one by one to check if these are creating issue for some (low-end?) devices.

Tip: Components with parameter set to fill parent does not need a responsive block!

1 Like

I tried to reduce this type of blocks for resize, im using % in designer and this is resulting very well.

Could be helpful. This is too auto responsive. :ok_hand: