Page MenuHomePhabricator

[lib] Introduce ChatThreadItemLoaderCache
ClosedPublic

Authored by ashoat on Dec 11 2024, 3:49 PM.
Tags
None
Referenced Files
F6091571: D14140.id46394.diff
Mon, Apr 21, 1:54 AM
F6087426: D14140.id46393.diff
Mon, Apr 21, 12:22 AM
F6056217: D14140.diff
Sun, Apr 20, 7:13 AM
Unknown Object (File)
Mar 11 2025, 4:10 PM
Unknown Object (File)
Mar 11 2025, 4:10 PM
Unknown Object (File)
Mar 11 2025, 4:00 PM
Unknown Object (File)
Mar 6 2025, 2:52 PM
Unknown Object (File)
Feb 26 2025, 4:45 AM
Subscribers
None

Details

Summary

This is the core of the work to address ENG-9952.

Prior to this stack, we would kick off Promises for each thread. At the end of the stack, we want to only kick off enough Promises to generate the "guaranteed top N", which can be thought of "if every Promise was resolved, which would be in the top N"?

We are able to achieve this guarantee using the "at most time", which was introduced in D14136. Most of the magic is in the loadMostRecent function.

Depends on D14139

Test Plan

I tested this task by playing around with the ChatThreadList on mobile while using a stopwatch to measure how long various operations took. I tested the updated code 3 times against both the most recent Testflight build as well as master. I found that performance was approximately the same as before. I tested scrolling down, selecting threads that were read, selecting threads that were unread, and search.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable