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
F13226233: D18647.diff
Sun, May 19, 7:52 PM
F13224702: D18647.id44772.diff
Sun, May 19, 10:16 AM
F13213704: D18647.diff
Fri, May 17, 8:01 AM
Unknown Object (File)
Tue, May 7, 8:38 AM
Unknown Object (File)
Sat, May 4, 3:14 AM
Unknown Object (File)
Fri, May 3, 8:14 AM
Unknown Object (File)
Thu, Apr 25, 2:33 AM
Unknown Object (File)
Apr 19 2024, 6:50 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