Pause at first game

I am seeing a 9 - 10 second pause when I access a game. This only happens on the first game accessed in a session. Happens in both Firefox and Chrome. I see a brief flash of the map, but goes back to the white background.

If I open a second game there is no delay.

No network traffic during the pause, seems to be mostly graphic routines running which is strange as the map was already done.

Anyone else seeing this?

Most of the code is stupidly synchronous and no files are cached. Are you sure about no network traffic? I’ll try tweaking the cache settings for game graphics files and check back here when done.

You are right, I had image loads disabled in networks. It is the loading of the images that is the cause.
They are not being cached.

Now the images are being reloaded on each game access

The images return the following in response header:
cache-control:no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0

Yes, it was completely disabled. I added http caching directives for game assets now and still see the same pause which is 1 second for me, let me know if it’s better for you. If not, I’ll look into preloading, browser database caching, bulk loading, or other options.

1 Like

All images now cache, no more delay, Thanks! :partying_face:

1 Like