-
-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
Description
In #2561 @mamazu pointed out where matching of completion input to available names has place. First thing I did was playing with regex-based fuzzy matching (created years ago for my phpcd fork) #2561 (comment) especially checking if it can be intolerably slow.
The benefit seems to be considerable even at some cost of performance.
The implementation is simple itself and to replace if it were invented and can be combined with other Criteria classes (for example ShortNameBeginsWith could be checked first, fuzzy matching otherwise) into compound Criteria.
On the other side, to avoid checking
if (!$record instanceof HasShortName) {
return false;
}
if (!$this->name) {
return false;
}more than once such compound matching should be implemented in a single class - to discuss.
Reactions are currently unavailable
