Reduced Screen1 startup time

I have an application that contains 4500 blocks and they are all from Screen1. I don’t upload images directly, just by string. I use arrangements that alternate between visible and not visible. My “initialize” component has only one arrangement that starts with true and with a 40k background image (reported by string). Today, the application takes 30 seconds to open that first arrangement. My doubt is whether the app needs to be fully loaded to run “initialize” or while loading it already triggers “initialize”? Is there any way I can do to find out why it is taking 30 seconds? I found a Boban solution for Inventor on the forum, but you need to open the APK code and this for me, a beginner, is very risky.

2 Likes

40000 images what :dizzy_face:

Only one a 40kb image that is used for background.

can send apk file

when i create any app in kodular i don’t use screen1 i create another screen for work
or if app take time to load i add splash screen.

1 Like

Hassan, thanks for your guidance. This project is the 7 version. I started separating features by screen, then I reduced it until I reached screen1. Because the performance of changing screens was very bad. I got the perfect performance when changing features using only one screen, however, the initial load is very time consuming. Unfortunately, I cannot make the APK public. It would be of great help if I had permission to publish now.

1 Like

what does that mean? can you elaborate?
have you seen tip 2


Taifun

Taifun, I read and followed all the suggestions on the link. I upload images only when they are needed in the process.

If your screen takes time to initialize use your own splash image to utilize the time and use animation for splash screen to make it look like time is not wasted

i think he is pointing like this
Screenshot_2020-08-01 Kodular Community
Calling image from assets in a “string”, instead showing it from designer properties

1 Like

I think your topic is similar to this topic

1 Like

Soham, I would like to understand your suggestion better. I created an initial arrangement, that when the app is started, it shows an image. Would it be this? If so, it is taking a long time to reach that arrangement, which is in the initialize block.

In that case what I had done I’ll tell you when screen initialize show image and activate clock timer, when clock timer, get data from database, hide image and clock timer false

Soham, in the video you can see that to get to the splash image, it has a white screen of about 15 seconds, sometimes much more. Only after that time does the image and timer start.
please, would there be another way to do this? As I understand it, what I did was exactly what you suggested.

What happens when you remove the clock timer block from screen initialize and instead in screen initialize just set an image visible to true and also please show all the designer properties of Screen1

I did as you suggested but the time is still too high. I removed the timer and put a button for when it is clicked opens another feature.

@ledumelo
I believe this can help you:
Async Procedures Extension

and for the long time taken for your app to run, you have to debug your blocks and see if any for loops is doing a heavy work and I suggest testing on another phone.

I already have done some testing on this issue, after creating this topic


And we might consider the possible causes are device versions also… I found out that it just took 3-4 seconds for android 9 with enough RAM, so also some assets size trigger also. Try to install your app in the latest android device.

Silver, I just call it an arrangement that I call a splash in the initialize. I don’t use a timer or a counter for that. However, other arrangements that are not called and are hidden have slightly slower procedures. Even if these procuredures are not called, can they impact the initial application load?

I tried on 3 different cell phones and all the initial charge time is very long.