Signal-iOS/SignalServiceKit/tests
George Nachman 22c1cb8a22 Fetch phone numbers in a batch.
This is the first meaty part of optimizing
fetching display names.

Some contacts fall back to phone numbers as their
display names. This PR fetches them in a single
SQL query via
`OWSContactsManager.phoneNumbers(for:, transaction)`.

To achieve this, this PR introduces
`GRDBSignalAccountFinder.signalAccounts(for:,transaction:)`
to fetch many accounts at once.

In order to fetch many accounts at once, we need
to be able to fetch many values from a
ModelReadCache at once. So this PR introduces
`ModelReadCache.readValues(for:,transaction:)` and
`ModelReadCache.getValues(for:,transaction:,returnNilOnCacheMiss:)`.

Existing methods that operate on a single value
were refactored to use the batch methods.

This PR adds tests for this functionality, which
necessitated changing the visibility of various
private symbols and also improving the fake
profile manager to make it more configurable.

There's also a tiny optimization for Refinery to
avoid calling a closure that has no work to do.
This helps elide do-nothing SQL queries that would
otherwise have been introduced.
2022-03-17 12:46:33 -07:00
..
Account Fetch phone numbers in a batch. 2022-03-17 12:46:33 -07:00
Contacts Fix broken tests 2022-03-03 14:23:51 -08:00
Devices SSK: Port OWSDeviceProvisioner (and OWSProvisioningMessage) to Swift 2022-03-17 12:25:39 -07:00
Groups Rework the 'pending member requests and invites' view. 2020-09-03 18:33:07 -03:00
Messages Add StoryMessage protos 2022-03-16 17:50:01 -07:00
Network Simplify AFNetworking usage. 2021-10-15 10:50:37 -03:00
Security Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
Storage Fetch phone numbers in a batch. 2022-03-17 12:46:33 -07:00
Util Fetch phone numbers in a batch. 2022-03-17 12:46:33 -07:00
SSKBaseTestObjC.h Respond to CR. 2021-10-21 09:21:31 -03:00
SSKBaseTestObjC.m Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
SSKBaseTestSwift.swift Remove YapDatabase. 2021-03-25 11:41:16 -03:00
SSKSwiftTests.swift Convert to just using CocoaPods for dependencies 2020-01-02 12:03:57 -08:00