Signal-iOS/SignalServiceKit/src/TestUtils
George Nachman 7702463524 Temporarily increase user profile cache size.
PR 2982 optimized
ConversationViewController.createGroupMembershipCollisionBannerIfNecessary`
that fetches user profiles off the main thread and
then, when that completes, uses them on the main
thread to find duplicate display names.

The optimization doesn't work for large groups.
Because `UserProfileReadCache` is backed by an
LRUCache with a maximum capacity of 32, there is
effectively no cache and profiles get fetched
twice.

The main purpose of this commit is to fix this
optimization for large groups without expanding
memory usage unnecessarily. While increasing the
LRU cache's size to 1000 (or some other arbitrary
value) would fix the problem very simply, my gut
tells me that we're going to keep running into
this problem.

Rather than pick an arbitrary "large enough"
value, this commit increases the cache size to be
just large enough for its intended purpose and to
keep it that size for just long enough to do its
job.

This commit introduces the concept of a "lease" on
a larger cache size. The cache's size is defined
as the largest of all its leases plus its
"regular" size (the size it was initialized with).
For now only the user profile cache uses it.
2022-02-11 13:20:12 -08:00
..
Factories.swift Record uniqueIds of messages that receipt messages refer to 2021-07-29 20:40:40 -07:00
FakeAccountServiceClient.swift Change phone number. 2021-11-19 14:28:18 -03:00
FakeContactsManager.swift Temporarily increase user profile cache size. 2022-02-11 13:20:12 -08:00
FakeStorageServiceManager.swift Convert to new Promise library 2021-09-03 11:41:34 -07:00
MockSSKEnvironment.h Move MobileCoin SDK to SignalUI. 2021-11-02 14:26:02 -03:00
MockSSKEnvironment.m Fix badge expiry 2021-12-17 13:54:20 -08:00
MockSubscriptionManager.swift Don't show subscription megaphone again until your subscription has been expired for at least 2 weeks 2022-02-11 13:09:20 -08:00
NoopNotificationsManager.swift Elaborate logging around missing notifications. 2021-09-02 22:51:26 -03:00
NoopPendingReadReceiptRecorder.swift Add support for viewed receipts 2021-04-29 18:01:18 -07:00
OWSFakeCallMessageHandler.h Respond to CR. 2021-10-21 09:21:31 -03:00
OWSFakeCallMessageHandler.m Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
OWSFakeMessageSender.h Respond to CR. 2021-10-21 09:21:31 -03:00
OWSFakeMessageSender.m Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
OWSFakeProfileManager.h Respond to CR. 2021-10-21 09:21:31 -03:00
OWSFakeProfileManager.m Temporarily increase user profile cache size. 2022-02-11 13:20:12 -08:00
OWSMockSyncManager.swift [Badging] Signal devices when subscription status changes 2021-12-02 21:04:47 -10:00
TestAppContext.h Respond to CR. 2021-10-21 09:21:31 -03:00
TestAppContext.m Do not use -[UIApplication setStatusBarHidden:animated:]. 2022-01-31 15:15:18 -08:00
TestKeychainStorage.swift Fix a couple test breakages 2021-06-02 19:03:25 -07:00
TestProtocolRunner.swift Update to SignalClient 0.9.0 2021-09-08 13:31:20 -07:00