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
Unknown Object (File)
Fri, Apr 19, 6:50 PM
Unknown Object (File)
Wed, Apr 17, 2:57 PM
Unknown Object (File)
Sat, Apr 6, 4:04 AM
Unknown Object (File)
Sat, Mar 30, 5:14 AM
Unknown Object (File)
Thu, Mar 28, 4:08 AM
Unknown Object (File)
Mar 15 2024, 12:17 PM
Unknown Object (File)
Mar 4 2024, 6:09 PM
Unknown Object (File)
Feb 22 2024, 7:28 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