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
F18739099: D18647.diff
Wed, Oct 1, 7:46 PM
F18652276: D18647.id44772.diff
Sun, Sep 21, 7:28 AM
F18625390: D18647.diff
Mon, Sep 15, 10:42 PM
F18460007: D18647.id.diff
Sep 1 2025, 6:28 PM
F18442238: D18647.diff
Aug 31 2025, 4:53 PM
F18103234: D18647.id44772.diff
Aug 10 2025, 3:05 AM
F18089988: D18647.id44766.diff
Aug 6 2025, 1:39 PM
F18087588: D18647.diff
Aug 6 2025, 4:35 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