-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
This is a follow up from this PR:
which was created for this issue ticket originally:
This is a follow up ticket where we'd like to do some research on how to maximise efficiency.
The data a user wants to search through in expensify don't change that often that much (new reports are added, or new coworkers are added to a workspace, but overall these are only small additions if that user has 20k personal details - we don't expect those to change that often).
Right now on every app load we construct a new FastSearch instance, which is efficient but still takes some time and resources (it takes longer the bigger the data set of the user).
We could optimise this by storing the backing array buffer of the search tree, and on app start just loading it from storage. We assume that this can be very fast as array buffers don't need to be serialized and are very quick in react-native-mmkv and indexeddb.
With this ticket we want to see, if this approach and added complexity would be worth the performance gain.