App freezes in HTML5 on iphone

Faced the following problem. On an iPhone in HTML5 the app freezes when sending a message “enabled” to some gui. This gui is in the current collection. I have three diferent gui. When this collection is loaded I send “disable” to the other two. When i need to show hiden’s collection - i send"/kingdom#gui", “enable”)
I have used this many times on other projects and it worked great. Everything works fine in the Android browser. On iphone in safari and chrome i see some lags.

If I try to show the GUI again, everything starts working without problems. As if at the very beginning he is trying to load something, although this gui does not have a separate atlas for example - it uses a common one.

Drawcall within 10.
Proj have 4 atlases(2048x2048, 1024x512, 1024x1024, 2048x2048)

it’s weird because we’re testing on iphone 13 pro and we have best performance on cheap android.

Thank you!

Hard to say what is wrong to be honest. And it only happens on html5? Could it be Lua garbage collection? I wonder if it also happens in a native build but is less prominent? Perhaps there is a small hitch in the profiler?

are you sure it is ONLY"/kingdom#gui", “enable”) ?
Maybe you also call some code or something else you don’t take into account?


Thanks for your answers!

Уes, i sure

Okay, I’ve finished my mini research. I removed absolutely all the extensions and the code - I left only the code needed to display the pages. The situation has not changed - safari on ios is usually necessary for some time to show the GUI interface for the first time. The next opening of the interface occurs without problems.

I have used monarch (and set “preload”) but it has the same problem.

My solution: After loading the collection with the game, I wait for a while, still keeping the loading screen. Then I will send a message that I need to hide all unnecessary interfaces, and after some time I show the game. This works great.

Thank you for your attention!

1 Like