This repository has been archived by the owner on Sep 4, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[performance] Schedule resolveAddress immediately
resolveAddress requests are done with one query at a time, in order to correlate the results with the looked-up addresses. Doing them sequentially via UpdateRequest events added a lot of overhead in the form of coordination between threads. This commit creates a dedicated QContactFetchRequest for each resolveAddress call, so that the events for starting them can arrive all together in the backend thread and the events announcing the results can arrive all together in the UI thread. They will still be processed sequentially, but this change cuts out the delay between finishing one request and starting the next. In tests with 10k contacts and a recent contacts list with limit=20, this reduced the resolve time from 1s to 0.3s.
- Loading branch information
Showing
2 changed files
with
105 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters