allsky icon indicating copy to clipboard operation
allsky copied to clipboard

[BUG] Delay before "Loading" image goes away when accessing website via tablet/smartphone

Open markusd112 opened this issue 1 year ago • 11 comments

Camera model

Raspi HQ

Operating System

Buster

Allsky version

V2023.05.01_05

Pi and amount of memory (512 MB, 1, 2, 4, or 8 GB)

Raspi 4, 8GB

Bug Description

When I go to my AllSky website via browser on my tablet (iPad 10) or my smartphone (Samsung Galaxy S23), the page regularly says "Loading" for about 60 seconds, apparently until the page automatically refreshes. When I do a manual reload, the camera image appears immediately. It works perfectly on a desktop computer: the camera image is always displayed immediately. It only happens with mobile devices.

signal-2024-11-27-090114_002

Log / configuration files

No response

markusd112 avatar Nov 27 '24 08:11 markusd112

Is your Website on the Pi or a remote server on the Internet? If the later, what's the URL?

Since the delay only occurs with a mobile device, it's probably not a Allsky problem. What mobile browser are you using?

EricClaeys avatar Nov 27 '24 15:11 EricClaeys

The website is on a remote webserver on the internet. The URL is:

https://sternstunden-astronomie.de/

I am using Chrome browser on my Android device and Safari on the ipad. The problem only occurs with my allsky website.

markusd112 avatar Nov 27 '24 16:11 markusd112

A friend of mine is hosting his allsky website on an internet server too and the same problem occurs with his allsky website, when I open it with my mobile devices, so I think its not a specific problem of my installation/webserver.

markusd112 avatar Nov 27 '24 17:11 markusd112

@markusd112, when I went to your page with my Samsung S10 using Samsung's browser, I saw "Loading" for 30-60 seconds (didn't time it). When I refreshed the page several times "Loading" was only there for 6 seconds. It's possible that's because I am in the US, but I haven't seen this behavior with other European Allsky sites. They usually show the picture as it downloads, but your whole image appeared at once. Your "intervalSeconds" is 30, so if you initially don't see the image for 60 seconds it probably isn't related to that. But as a test, would you please change the interval to 15 seconds and retest? I will also then retest.

Samsung's browser used to have Developer Mode, equivalent to F12 on a PC, but I can't find it anymore. Does the iPad have it?

EricClaeys avatar Nov 27 '24 20:11 EricClaeys

@EricClaeys I've changed the interval to 15 seconds in the moment. Thanks for testing it.

edit: it seems that it decreases the time where you see "loading" to around 15 seconds for my Samsung Galaxy S23 now. But the strange thing is that it only happens with my S23 and my ipad as well, not with my computers (Firefox, Edge)...

On the ipad you can activate dev tools as described here, but it seems that you need a connection to a PC to access the web developer toolbar

https://stackoverflow.com/questions/5734323/ipad-safari-development-toolbar

markusd112 avatar Nov 28 '24 05:11 markusd112

With intervalSeconds at 15 the image showed up in about 3 -4 seconds. Try the default of 5 seconds.

EricClaeys avatar Dec 01 '24 15:12 EricClaeys

I looked at the code for the page and can't see why there would be a delay, other than typical network speed. That's not saying there isn't a problem, just that I can't see one.

@Alex-developer, thoughts?

EricClaeys avatar Dec 01 '24 19:12 EricClaeys

Which address are you having a problem with? The screenshot shows one address, partly obscured but you posted another one in the comment above.

If its a local website i.e. a .local address I can probably explain it but if its an externally hosted site then I would have to do some testing

Thanks

Alex

Alex-developer avatar Dec 01 '24 20:12 Alex-developer

@Alex-developer It is a public hosted website. I have assigned a temporarily Domainname and wiped out the normally used one, because I don‘t want to publish it here. The problem occurs with both DNS names. It also occurs at the public allsky website of a friend of mine (other hosting provider than me: IONOS), so it doesn‘t seems to be a specific problem with my installation or my hosting provider ( all-inkl.com)

markusd112 avatar Dec 01 '24 21:12 markusd112

@Alex-developer It is a public hosted website. I have assigned a temporarily Domainname and wiped out the normally used one, because I don‘t want to publish it here. The problem occurs with both DNS names. It also occurs at the public allsky website of a friend of mine (other hosting provider than me: IONOS), so it doesn‘t seems to be a specific problem with my installation or my hosting provider ( all-inkl.com)

Thanks

We will take a look and see if we can reproduce it

Alex

Alex-developer avatar Dec 01 '24 22:12 Alex-developer

With intervalSeconds at 15 the image showed up in about 3 -4 seconds. Try the default of 5 seconds.

I have set it to 5 seconds today and it needs around 3-5 seconds now to display the allsky image on the mobile devices.

I followed the recommendation in the documentation and set it to half the exposure time (30 seconds). So setting it to 5 seconds seems to be a good way getting it working, still the cause for this issue is unclear. I believe that the computing power of end devices is so great these days that this shouldn't have a massive impact on CPU usage.

markusd112 avatar Dec 09 '24 19:12 markusd112