Improve library performance (#11)
Closed
Andrzej Wójcik (Tigase) opened 8 years ago
Due Date
2016-08-21

Currently library reads data, parses XML and processes stanza using single thread.

I think it is worth to look into this and allow reading data, processing, etc. to be done in many threads. This can speed up time needed for connection/resumption and it may also reduce energy usage due to shorter processing time.

Artur Hefczyc commented 8 years ago

+1, I think this is essential for version 1.0.

Andrzej Wójcik (Tigase) commented 8 years ago

I added additional processing queues in TigaseSwift library which should offload processing from main application thread. I also changed queues used for firing events and callbacks passed as parameter to function.

Due to this changes it was required to change few methods and adjust mobile application to work properly with multiple threads - now it receives event not on main thread, so proper "synchronization" was required (in fact there is no synchronization in Swift, so I needed to properly use dispatch queues).

During my initial test I found few issues and fixed them. I adjusted due date to have time to verify my changes before pushing them to master branch.

I also run profiler on library and client and identified few issue - for them I will create separate tasks.

Andrzej Wójcik (Tigase) commented 8 years ago

Tested and all works fine

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
4245
Issue Votes (0)
Watchers (0)
Reference
tigase/_libraries/Martin#11
Please wait...
Page is in error, reload to recover