mrjaw Active Member Licensed User Longtime User Nov 16, 2016 #1 Hi! I am developing an app to show pictures like instagram or 9GAG. My problem is the time it takes to download an image. I am looking for any advice or benchmarkinh how can I do this like 9GAG or another picture app. I was trying to download 20 images but it is so slow if you internet is solow so how can I do this downlaod one by or bunch. I need any advice or method to do it. Sorry for my bad english!
Hi! I am developing an app to show pictures like instagram or 9GAG. My problem is the time it takes to download an image. I am looking for any advice or benchmarkinh how can I do this like 9GAG or another picture app. I was trying to download 20 images but it is so slow if you internet is solow so how can I do this downlaod one by or bunch. I need any advice or method to do it. Sorry for my bad english!
Erel B4X founder Staff member Licensed User Longtime User Nov 17, 2016 #2 You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list. Make sure to also remove old images to avoid consuming too much memory. Upvote 0
You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list. Make sure to also remove old images to avoid consuming too much memory.
KMatle Expert Licensed User Longtime User Nov 17, 2016 #3 Where are these images from? Your own on your own server (from a db)? If yes: - Reduce the size to f.e. 800x600 and 90% JPEG quality (so every image has about 30-50KB each). Or even less like 480x320. - Store it as a Base64 string - when retrieving you can create an array of 10 images or so and download it to your app (50KB * 10 = 500KB plus overhead) or load them in the background. Upvote 0
Where are these images from? Your own on your own server (from a db)? If yes: - Reduce the size to f.e. 800x600 and 90% JPEG quality (so every image has about 30-50KB each). Or even less like 480x320. - Store it as a Base64 string - when retrieving you can create an array of 10 images or so and download it to your app (50KB * 10 = 500KB plus overhead) or load them in the background.
mrjaw Active Member Licensed User Longtime User Nov 25, 2016 #4 Sorry for delay. The images are in my DB , stored like binary files. While you want to convert into Base64? Maybe load the images on background Erel said: You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list. Make sure to also remove old images to avoid consuming too much memory. Click to expand... Upvote 0
Sorry for delay. The images are in my DB , stored like binary files. While you want to convert into Base64? Maybe load the images on background Erel said: You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list. Make sure to also remove old images to avoid consuming too much memory. Click to expand...
mrjaw Active Member Licensed User Longtime User Nov 25, 2016 #5 Erel said: You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list. Make sure to also remove old images to avoid consuming too much memory. Click to expand... I did this but it was so slow, I downloaded 10 images at moment but it was sol slow Upvote 0
Erel said: You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list. Make sure to also remove old images to avoid consuming too much memory. Click to expand... I did this but it was so slow, I downloaded 10 images at moment but it was sol slow