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
F19902837: D18647.diff
Mon, Mar 30, 9:26 PM
F19823706: D18647.diff
Mar 7 2026, 2:33 PM
F19817931: D18647.diff
Mar 5 2026, 4:33 PM
F19814743: D18647.diff
Mar 4 2026, 3:23 PM
F19777811: D18647.diff
Feb 22 2026, 9:52 PM
F19521321: D18647.diff
Jan 16 2026, 9:12 PM
F19509576: D18647.id44766.diff
Jan 10 2026, 10:27 PM
F19508525: D18647.id44766.diff
Jan 10 2026, 6:13 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