madagaga / WTalk

GTalk like client
MIT License
20 stars 10 forks source link

Performance imporvements #5

Closed thecodrr closed 7 years ago

thecodrr commented 8 years ago

I have, at the moment, only 2 conversations in Hangouts but the loading time is quite noticeable. WTalk will be overwhelmed if there are 100+ conversations, it will keep fetching the whole day. What about implementing on-the-go strategy? I mean, loading the conversation interface as soon as first or second conversation loads or it would be better to load no conversation until it is opened and clicked by the user. This will reduce loading time significantly. Only the conversation name will be loaded, and as soon as the user will click on the conversation in the conversation list, the poll request will be sent for message history.

I will acknowledge other performance bugs as I test the application in more depth.

thecodrr commented 8 years ago

Have you tried using async/await when sending poll requests?

madagaga commented 8 years ago

The first load is synchronous, because if not, the UI would be empty. This first request get a big response which contains session info, last active conversations.

After this, all request are async.

thecodrr commented 8 years ago

Right now, there is a long delay before a sent message is displayed and sometimes its not even displayed. There is also the delay when we click on the "Send Message TextBox". Also another delay when we scroll upward to get previous messages.

During the first delay, sometimes the UI becomes unresponsive.

madagaga commented 7 years ago

Performance (speed) is more acceptable now. but there still some bugs, i've revamped all the code