Optimize wildcard matching by converting SafeFNMatch_ to an iterative approach#1151
Optimize wildcard matching by converting SafeFNMatch_ to an iterative approach#1151RadoslavPetkow wants to merge 1 commit intogoogle:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1151 +/- ##
==========================================
- Coverage 62.22% 62.12% -0.10%
==========================================
Files 19 19
Lines 2324 2326 +2
Branches 845 843 -2
==========================================
- Hits 1446 1445 -1
- Misses 596 600 +4
+ Partials 282 281 -1
|
sergiud
left a comment
There was a problem hiding this comment.
Thanks for the PR.
It looks like the changes cause the demangle unit test to no longer pass on Linux. Could you please also split the SafeFNMatch_ unrelated refactorings and submit these in a separate PR?
Hey, no worries. I’m really sorry for the delay—I’ve been swamped with work at university lately. I’ll take a closer look at the demangle unit test issue on Linux, and I’ll also split the SafeFNMatch_ refactorings into a separate PR as requested. Thanks for your patience and the feedback! |
Refactored SafeFNMatch_
Replaced the recursive implementation with an iterative approach to handle ‘*’ and ‘?’ wildcards. This change eliminates recursive call overhead and reduces potential stack usage, leading to improved performance in logging scenarios.
Maintained Behavior
The change preserves all existing semantics, ensuring that only the internal implementation of wildcard matching is affected.
Minor Code Cleanups
Made slight adjustments to pointer arithmetic and code formatting in functions such as VLOG2Initializer for improved clarity and robustness.