Signal-iOS/SignalServiceKit/src/Protocols
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
..
ContactsManagerProtocol.h Temporarily increase user profile cache size. 2022-02-11 13:20:12 -08:00
NotificationsProtocol.h Elaborate logging around missing notifications. 2021-09-02 22:51:26 -03:00
OWSCallMessageHandler.h Use server timestamp when filtering stale calls 2021-10-08 11:51:36 -07:00
ProfileManagerProtocol.h Temporarily increase user profile cache size. 2022-02-11 13:20:12 -08:00
ProtoUtils.h Never emit invalid e164 in storage service contact records; be robust to invalid e164 incoming protos. 2021-09-01 16:33:16 -03:00
ProtoUtils.m Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
SubscriptionManagerProtocol.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