GlobPattern::isTrivialMatchAll() returns true for the GlobPattern "*"
which will match all inputs.
This can be used to avoid performing expensive preparation of the input
for match() when the result of the match will always be true.
Differential D87468
[Support] Add GlobPattern::isTrivialMatchAll() andrewng on Sep 10 2020, 10:15 AM. Authored by
Details GlobPattern::isTrivialMatchAll() returns true for the GlobPattern "*" This can be used to avoid performing expensive preparation of the input
Diff Detail
Event TimelineComment Actions GlobPattern::matchOne has a fast path for '*'. Isn't it fast enough?
Comment Actions As mentioned in the summary, this is to avoid cost in preparing/acquiring the input, i.e. not the speed of the match but overhead related to the input.
Comment Actions This new function enables the user of the GlobPattern to avoid overhead, see D87469 for an example.
Comment Actions I've checked the dependent patch. This looks reasonable. Please wait for @grimar as well.
|
This is not correct (*foo). Suffix may be non-empty.