I want to build a web-chat page like the follow image shown.
I may be select three friends to talk with, and there is a friend I current talk with. The list, which shows the chat information, can fold and unfold. And the list should pull to refresh, which means there will be many items that maybe 200 or more.
And when I switch User1 to User2, the chat information list will clear all items and add another items which show the chat information between I and User2.
Now I have achieved this, but I meet a problem: if there were too many items between I and User2, and if I switched User1 to User2, it will wait for some minutes.
So how to optimize this page?