Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议最后一条聊天记录不要去遍历整个聊天表了 放在会话表多好 #16

Open
kangtian opened this issue May 5, 2017 · 2 comments

Comments

@kangtian
Copy link

kangtian commented May 5, 2017

接收消息数据量大的时候 真的会卡死

@tbl00c
Copy link
Owner

tbl00c commented May 5, 2017

真的会卡死吗??曾经考虑过放到会话表,但这样,每次收到消息都要更新会话表了~

@kangtian
Copy link
Author

kangtian commented May 5, 2017

一张用户存储聊天列表信息,这里假如它叫chatlist ,即微信首页 ,用户存储每个群或者单人会话的最后一条信息 。来消息时更新该表,并更新内存数据源中列表信息。或者每次来消息时更新内存数据源中列表信息 ,退出程序或者退出聊天列表页时进行数据库更新。后者避免了频繁操作数据库,效率更高。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants