Page MenuHomePhabricator

[lib] Introduce ChatThreadItemLoaderCache
ClosedPublic

Authored by ashoat on Wed, Dec 11, 3:49 PM.
Tags
None
Referenced Files
F3509925: D14140.id46361.diff
Sat, Dec 21, 9:29 AM
F3508756: D14140.diff
Fri, Dec 20, 11:51 PM
Unknown Object (File)
Fri, Dec 20, 12:32 AM
Unknown Object (File)
Thu, Dec 19, 5:26 PM
Unknown Object (File)
Thu, Dec 19, 12:17 PM
Unknown Object (File)
Wed, Dec 18, 7:52 PM
Unknown Object (File)
Wed, Dec 18, 7:03 PM
Unknown Object (File)
Wed, Dec 18, 6:30 PM
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