zulip-android-legacy icon indicating copy to clipboard operation
zulip-android-legacy copied to clipboard

Show unread counts and add bankruptcy option.

Open Sam1301 opened this issue 7 years ago • 8 comments

Summary of changes

  • shows unread counts

    • real-time sync with server using update_message_flags event
    • UI changes
  • bankruptcy menu option

    • fetch all messages in batches of 200
  • fetch 1000 messages on start-up (related discussion https://github.com/zulip/zulip-android/pull/283#issuecomment-273869004)

Sam1301 avatar Mar 03 '17 01:03 Sam1301

So the main potential downside of fetching 1000 messages on startup is performance when on a slow network; to what extent have you tested that? It might actually be fine with compression, but we should be sure :)

timabbott avatar Mar 03 '17 18:03 timabbott

I tested the difference between fetching 100 and 1000 messages. Here are the results: For 100 messages (current behaviour) for100msgs

For 1000 messages for_1000msgs

these results were obtained for a 35Mbps connection... i think we could fetch 1000 messages in batches of 200 or so and display them simultaneously?

Sam1301 avatar Mar 03 '17 20:03 Sam1301

So I think with a 35Mbps connection, it'll be fine either way. For this, we want to test with a relatively slow connection.

We could do something simpler than doing 5 batches of 200, like fetch 200 at first (to show something) and then fetch the next 800. The thing that's really important to optimize here is the time-to-first-interaction, but there's not much reason to do 5 rounds over 2.

timabbott avatar Mar 03 '17 20:03 timabbott

ok got it, I'll update the pr with fetching 200 first and displaying it. Following this, in the background 800 messages can be fetched and added to the bottom of the list. During this time, the user will be able to interact with those 200 messages in the list. These 800 messages loaded in background could probably be fetched in a single call. Would that be fine?

Sam1301 avatar Mar 03 '17 20:03 Sam1301

Yep, fetching 800 in one call makes sense. FWIW the webapp does roughly that with 400 and 1000 as the parameters, so it's a pretty similar algorithm.

timabbott avatar Mar 03 '17 20:03 timabbott

@Sam1301 Really nice work! :) Resolve the merge conflicts too. :+1:

saketkumar avatar Mar 05 '17 09:03 saketkumar

@Sam1301, your pull request has developed a merge conflict! Please review the most recent commit (f791888) for conflicting changes and resolve your pull request's merge conflicts.

zulipbot avatar May 04 '17 18:05 zulipbot

@Sam1301, your pull request has developed a merge conflict! Please review the most recent commit (470ade3) for conflicting changes and resolve your pull request's merge conflicts.

zulipbot avatar May 07 '17 17:05 zulipbot