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)
Tue, Dec 17, 10:05 AM
Unknown Object (File)
Sun, Dec 15, 10:45 AM
Unknown Object (File)
Mon, Dec 9, 11:07 AM
Unknown Object (File)
Fri, Dec 6, 11:29 PM
Unknown Object (File)
Thu, Dec 5, 12:04 AM
Unknown Object (File)
Tue, Dec 3, 5:26 AM
Unknown Object (File)
Sun, Dec 1, 9:43 AM
Unknown Object (File)
Thu, Nov 28, 11:41 AM
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