HomePhabricator
Diffusion Comm c3231ddf2158

[lib] Use RadixTree in SearchIndex

Description

[lib] Use RadixTree in SearchIndex

Summary:
This diff actually uses the RadixTree introduced in the parent diff from the SearchIndex code.

Linear tasks: ENG-5137 and ENG-5480

Depends on D9626

Test Plan:

  1. I tested the chat mentions experience
  2. I did some perf testing:

In combination with the previous diff, I used this patch to test performance before and after this change. I made sure I had at least three samples of each scenario. Will also link my messy Gist of results, but it's not really interpretable by anyone other than me.

Here's the relevant portion:

BEFORE

 LOG  useChatMentionSearchIndex took 1801ms
 LOG  useChatMentionSearchIndex took 1748ms
 LOG  useChatMentionSearchIndex took 1730ms
 LOG  useChatMentionSearchIndex took 1831ms

 AVERAGE 1777.5ms

JUST DEDUP (parent diff)

 LOG  useChatMentionSearchIndex took 1027ms
 LOG  useChatMentionSearchIndex took 949ms
 LOG  useChatMentionSearchIndex took 957ms

 AVERAGE 977.7ms

DEDUP + RADIX TREE

 LOG  useChatMentionSearchIndex took 643ms
 LOG  useChatMentionSearchIndex took 629ms
 LOG  useChatMentionSearchIndex took 651ms
 LOG  useChatMentionSearchIndex took 609ms

 AVERAGE 633ms

JUST RADIX TREE

 LOG  useChatMentionSearchIndex took 1394ms
 LOG  useChatMentionSearchIndex took 1468ms
 LOG  useChatMentionSearchIndex took 1511ms
 LOG  useChatMentionSearchIndex took 1492ms
 LOG  useChatMentionSearchIndex took 1397ms

 AVERAGE 1452.4ms

Reviewers: tomek, atul, inka, rohan

Reviewed By: tomek

Subscribers: wyilio

Differential Revision: https://phab.comm.dev/D9627

Details

Provenance
ashoatAuthored on Oct 27 2023, 8:47 AM
Reviewer
tomek
Differential Revision
D9627: [lib] Use RadixTree in SearchIndex
Parents
rCOMM755557751d79: [lib] Introduce RadixTree
Branches
Unknown
Tags
Unknown