App freezes frequently on iphone

I just tested your app again after clearing my cache, it takes more than 30 seconds to load. I have a video :grinning:

My own app has a blank screen with the spinning gif after clearing cach. Here’s a video:

I think there are 2 separate issues here:

  1. App freezes while using and after a few min unfreezes.

  2. App takes too long to load. Sometimes it shows only white screen without a title and sometimes it shows a white screen with title and a spinning gif.

@SuperMerabh Thanks for taking time to do this testing.
Actually - I’m only using unsplash images on my front page - and they are not resized. I can see that most of the images are 5,7, 13 Mb which is way to much for a phone. Normally my images are around 200 kb.

@David you have made unsplash images available in Glide. Do we really need to resize the images ourselves in order to get acceptable loading times? I would have thought that you had cached the images already on your servers.

David explained they do resize the photos on the fly, for different screen sizes which makes a lot of sense. However, if you want to try, download all the images and resize them to less than 200k and then clear cache on your phone browser and try again. Let me know, I’ll do another test well. I still think it loads a lot faster when I do the optimization myself and upload to glide servers.

@SuperMerabh would you mind trying once more. I have replaced all the images - now the max size is 100 kb on the front page (instead of the maximum file size of 13 Mb!). It is really interesting whether it will load kind of instantly now. Then we have a case for David.

Yup freezes for 10 seconds before it loads any spinning icon or any thing

My speed is 400mb/s

Now it works much faster, here’s a video:

I cleared Safari cache before testing. It loads instantly.

I think we can make a strong case. For me, I feel have better control optimizing myself and uploading the glide server.

My speed is 25 mbps. Will try again later on WiFi.

@david @mark would you try to look at this case. After changing the images to much lower sizes @SuperMerabh have found that the app loads much faster. On the other hand @Yasin_Hassanien has also tried with a much higher band width and it takes a fair bit longer. I have also tried today after deleting cache (and resizing images) to have a load time of around 30 seconds on a 50 Mbit/s connection. But I have also had load times at around 5 seconds (after clearing cache)

I cannot understand what is going on.

Hi @krivo, I just looked at my app on desktop and wanted to see the file size that is created.

First, it creates a .webp file:

" WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP , webmasters and web developers can create smaller, richer images that make the web faster. WebP lossless images are 26% smaller in size compared to PNGs."

Second, the file size was very reasonable, only 136k, so the file size is NOT the problem, not sure exactly then why when I upload my file it loads much faster than the file from Upsplash, maybe the “on the fly” optimization is slowing things down, but David says they are expert in this particular thing, so I am also at loss. Till we know more, I am going to optimize the photos myself because it does seem to make a difference in load time.

Is it possible that Unsplash images are not optimized and are pulled directly in full resolution as opposed to images that are uploaded to Glide. Just an uneducated guess.

1 Like

Not sure if it helps and I don’t know if Glide introduces an “Iferror” thing in this, but I did have some problems transforming images from Unsplash with Cloudinary in the past, and it happened very randomly.

It’s possible that the Unsplash images are not being optimized.

4 Likes

@SuperMerabh when you found out it is a WebP fileformat that is used - did you you look at the published version of the app and then right-clicked on an image and downloaded it? I have done that and the imageformat is jpg (same as I uploaded). The images are very small 26 kb.

I had one more unsplash image on a hidden inline list with the size of 4 Mb. Resized this as well. But it doesn’t do any difference. Same loadtime. This morning (in Denmark) very fast loading. But on one occassion the loadtime was approx 30 seconds - that was after I made a change in a text field on one character. Afterwards I did the same again - and the loadtime was back to fast say 5 seconds.

@david A hypothesis why this happens - that we get very long load times which can be seen also as a app freeze.

All the app data is cached on a server in the users region - this cache will last for say one day. It will only be the first user that accesses the app after the cache has run out that will experience long loading times.

When the app developer does a change in the app the whole app needs to be downloaded again to the server before the server can deliver the app to the user. The would mean that the app will be slow the first time the app is downloaded by the user from that server - but would speed up when the next user downloads from that server.

Today I have seen a punctuaction mark change make the download process go from 5 seconds to 30 seconds. Afterwards I did another simple text change again and the download time was back to 5 seconds.

@krivo when I found it was WebP I simply opened the app on my desktop and did a “right click” to download the photo from upsplash, the file size was very reasonable, so it’s not the file size, it could be the actual process of resizing it on the fly but @david said they nailed that part down, so not sure.

I did an interesting experiment, that could shed some light. Yesterday my Internet at home was absolutely horrible, only 1.5 mbps till I rebooted the router, but it gave me an opportunity to see things in slow motion. I found something interesting:

Take a look at this video, it has how it showed on iphone first and then on desktop. At the moment I recorded these videos, only the “Store” item had an image directly from Upsplash, the rest are the ones I optimized myself and uploaded to Glide server.

Notice that on iPHONE, the upsplash image shows up LAST and then notice that on DESKTOP, the upsplash image shows up FIRST:

Stange, no?

I don’t have an explanation for that but maybe it will give @david and the team so ideas.

Ok, but there is a huge problem in the delay it takes to upload a photo taken via image picker. Regularly over one minute regardless of network. Other apps are much faster…

1 Like

True that, I found that if I navigate outside the upload window, it keeps uploading. So that’s what I do.

But then you can’t make it a required field…

Worked on my apps as well.

I had only 6.5 MB cache data on my iPhone, cleared it and now it opens within few seconds. Did nothing else to images etc.

@david, I get the iPhone freeze issue and can reproduce it at will on my app.
I created a list relation, when the user clicks on the list to see all the items, no issue.
When the user clicks on a detail view, still no problem, but when he then clicks the left arrow to get back to the list view, the app freezes on the iPhone (not the desktop).
It isn’t a full freeze but it takes 20-30 seconds to unfreeze.
The very strange thing is that this list is under the user’s own profile tab, but I have the exact same list when I navigate through the All Users tab, and there it never freezes.