Android Question Data and image download speed in an application similar to WhatsApp web

jose luis gudino

Active Member
Licensed User
Longtime User
We are developing an application similar to WhatsApp web, everything is working well, except when it brings me the information from the database when I log in, depending on the information it has, the process is slow. I have observed that when you open a new WhatsApp or Telegram session on a PC the images and chats refresh almost immediately, does anyone have an idea how they do it? greetings. Thank you very much in advance
 

Attachments

  • Screenshot 2024-05-15 095011.png
    Screenshot 2024-05-15 095011.png
    471.2 KB · Views: 105

Sagenut

Expert
Licensed User
Longtime User
I think that the small thumbnails are so small that the download is lightning fast.
When you click to enlarge you can notice that it needs a couple of seconds to retrieve the full size image.
So for every avatar you should have 2 files:
One for thumbnail and one for full size.
 
Upvote 0

jose luis gudino

Active Member
Licensed User
Longtime User
I think that the small thumbnails are so small that the download is lightning fast.
When you click to enlarge you can notice that it needs a couple of seconds to retrieve the full size image.
So for every avatar you should have 2 files:
One for thumbnail and one for full size.
Hello, I like that idea, I'm going to try downloading the data without downloading the image, to see if the download speed improves, I compress the images even more, I have a function that compresses them.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
You could save the avatar images like this (just an idea):
MyAvatar.jpg as the Full Size image at 1200x1200 resolution.
MyAvatar_t.jpg as the thumbnail at 150x150 resolution.
When scrolling the contacts list you load the thumbnails.
When needed request the full size image.
 
Upvote 0

jose luis gudino

Active Member
Licensed User
Longtime User
The images are already resolved, they load very quickly, now the issue is that I have to make the chat function like WhatsApp, that is, it only loads the latest conversions and that is what is shown and then as you scroll The customlistviews are reloaded upwards, it is as if they were loaded from the bottom up, can I explain the idea?
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Load your items in reverse, with InsertAt(0) and jump to the last item of the clv.
 
Upvote 0

jose luis gudino

Active Member
Licensed User
Longtime User
Hello everyone, this is the solution.
 
Upvote 0
Top