Startup form takes TWO MINUTES to load, after it's loaded, everything else is super fast

Since you have not changed anything but still the loading time increased, I think it’s simply because of your network speed which might have been slower when you tested.

Also, the theme.css takes a lot of loading time as well. Can you please check the time it takes to load the app after removing your Theme.css?

  • I removed all the css and it still takes a minute to load.

  • I deferred the import of all the unnecessary libraries to when they are needed inside the main Form class code.
    So now it looks like this:

Screenshot 2021-10-20 at 13.06.45

And here is the terminal:

Exactly one minute to get to the first line.

My question is, if everything is compiled from top to bottom, then the first print() function must be the first thing that is executed. Meaning all the imports are happening after the print() anyways.

Do you know what files/components are loaded before the first line of a startup form gets executed?

What if you create another empty app from scratch?

Is that slow?

Then add the services one by one and make it grow until it slows down, perhaps it will be faster that way finding what causes it to be so slow.

5 Likes

Yeah that looks like the only way to go. I’ll try to build it up from scratch and see when it gets slow. Will report back

2 Likes