Search suffix tree implementation#48652
Conversation
2b586a8 to
01162fe
Compare
|
I'll copy TODOs and paste here, since I took this PR over but can't edit an original post, so will track my progress in this comment: Remaining todos:
|
…en we will always get - so we add +1 bias)
|
@marcaaron all yours to a last look and merge! |
|
Re-running the perf test - I would first assume it failed for some other reason. |
|
Hmm still failing. |
|
Sorry for not posting it earlier, the discussion has been here about the failed performance test. I think the conclusion was to do nothing here in this PR and let Fabio handle it (the issue comes from switching to |
|
@hannojg can you please solve the conflicts here? @marcaaron once the conflicts are solved, do you think we can merge this? I agree that if the performance issue is with the change to |
|
Yes, but I am waiting for confirmation about how the performance tests work? I am unsure if merging this means that all App PRs will start to fail. Asked about it here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/marcaaron in version: 9.0.51-1 🚀
|
|
This PR is failing for Android because of issue #51123 |
FastSearch instance instead of recreating it on data change in SearchRouter
#51150
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.51-4 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.51-4 🚀
|
Details
This PR aims at improving the local search speed.
On a lower end android phone with a hightraffic account searching is currently taking around 344ms in the release build.
Our proposed suffix tree search implementation takes 0.14ms for searching on that same device.
That is a 2456x improvement.
Remaining todos:
N. Initially it was 1_000_000, I set it to be 25_000, because otherwise allocating the memory took a very long time. Can we approximate N? Can we use array buffers here?ñChatFinderPagewhich we should hide in our implementation, such as the delimiter chars, thestringToArrayfunction, the manual mapping from indexes toOptionDataFixed Issues
$ #46591
PROPOSAL:
Tests
hanno@margelo.io), make sure it's found. Then search forhannomargeloio(removing all special chars), and make sure its still foundOffline tests
Same as testing steps
QA Steps
Same as testing steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen_Recording_20240927_212736_New.Expensify.Dev.mp4
Android: mWeb Chrome
Screen_Recording_20240927_211510_Chrome.mp4
iOS: Native
Screen.Recording.2024-09-27.at.21.28.56.mov
iOS: mWeb Safari
ScreenRecording_09-27-2024.21-34-17_1.MP4
MacOS: Chrome / Safari
Screen.Recording.2024-09-27.at.21.08.10.mov
MacOS: Desktop
Screen.Recording.2024-09-27.at.21.28.10.mov