ChatSecure / ChatSecure-iOS

ChatSecure is a free and open source encrypted chat client for iOS that supports OTR and OMEMO encryption over XMPP.
https://chatsecure.org
Other
3.13k stars 1.02k forks source link

Limit YapDatabaseViewMappings results to prevent UI hangs #360

Open JackQiangXJ opened 9 years ago

JackQiangXJ commented 9 years ago

when in message screen, keep receive message from buddy, app will freeze 1s to 2s.

I think it caused by [self.collectionview reloaddata] in the func ----- yapDatabaseModified:

chrisballinger commented 9 years ago

Does this happen all the time? Do you have a large number of messages? It may be an issue with a 3rd party framework.

On Thu, Jul 9, 2015 at 9:05 PM, 风吹拖拉机 notifications@github.com wrote:

when in message screen, keep receive message from buddy, app will freeze 1s to 2s.

I think it caused by [self.collectionview reloaddata] in the func ----- yapDatabaseModified:

— Reply to this email directly or view it on GitHub https://github.com/ChatSecure/ChatSecure-iOS/issues/360.

JackQiangXJ commented 9 years ago

yes,it happen all the time,I think you can try to receive 50 offline messages onetime.in my opinion,it caused by when received message,app will get a yapdbnotification in messageviewcontroller, then you will reload all data in this screen.

chuquangbao commented 9 years ago

Yeah, I have this same problems. And, I have more 2000 messages. App free when i am typing ( send chat and save chat state). How can i solve it?

chrisballinger commented 9 years ago

We should limit the number of messages to some same default in the Yap mappings, and provide a way to scroll back through your history and load that dynamically.

On Fri, Sep 11, 2015 at 2:21 AM, chuquangbao notifications@github.com wrote:

Yeah, I have this same problems. And, I have more 2000 messages. App free when i am typing ( send chat and save chat state). How can i solve it?

— Reply to this email directly or view it on GitHub https://github.com/ChatSecure/ChatSecure-iOS/issues/360#issuecomment-139497685 .