Page MenuHomePhabricator

Improve Ferret engine indexing performance for large blocks of text
ClosedPublic

Authored by epriestley on Sep 26 2017, 2:15 AM.
Tags
None
Referenced Files
F15399360: D18647.diff
Mon, Mar 17, 4:10 AM
F15377946: D18647.id44772.diff
Thu, Mar 13, 11:33 AM
Unknown Object (File)
Mon, Mar 3, 9:01 PM
Unknown Object (File)
Feb 12 2025, 2:55 AM
Unknown Object (File)
Feb 6 2025, 3:40 AM
Unknown Object (File)
Jan 30 2025, 2:20 PM
Unknown Object (File)
Jan 22 2025, 5:36 PM
Unknown Object (File)
Jan 22 2025, 3:36 PM
Subscribers
None

Details

Summary

See PHI87. Ref T12974. Currently, we do a lot more work here than we need to: we call phutil_utf8_strtolower() on each token, but can do it once at the beginning on the whole block.

Additionally, since ngrams don't care about order, we only need to convert unique tokens into ngrams. This saves us some phutil_utf8v(). These calls can be slow for large inputs.

Test Plan

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable