You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is almost certainly because the pattern starts with :[_], which unlike grep or line-based matching, will match across newlines (i.e., entire chunks of the file) before hitting the << part. This is a known behavior (there's a documentation tip for about it) and a warning was added in a recent release #147 to warn on this type of pattern.
My guess is that if your use case is somewhat line based, starting the pattern with something like :[_.] would work better (see reference, but it may not be sufficient for your use case depending on what the expression looks like--if so, let me know, this is still an active area of improvement).
Is your feature request related to a problem? Please describe.
I'm always frustrated when I type in a query and it takes a while to return results.
Describe the solution you'd like
It'd be nice if performance was optimized. For example, the following command:
comby -o -matcher .c -jobs 8 ':[_] << :[_] << endl' . 2>/dev/null $(rg -H '<<|endl' | cut -d: -f 1 | uniq)
is way faster (30s) than this command:
comby -o -matcher .c -jobs 8 ':[_] << :[_] << endl' . 2>/dev/null
(3min).
I'm sure there's other clever ways to improve performance as well.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: