improve performance of pcre matches
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | scripts: respect an initial LD_LIBRARY_PATH with env_use_destdirscripts/ | +7 | 0 replies | |
| 2/3 | libselinux: improve performance with pcre matcheslibselinux/ libselinux/ | +64 | 2 replies | |
| 3/3 | libselinux: use a static match_data if single threadedlibselinux/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] improve performance of pcre matches
The following series optimizes the way PCRE2 matches are done by using more efficiently the match_data resources and shows over 30% reduction in cpu utilization while only using 1/5 of the memory as shown in the bug report[1] that started it all.
The first patch is just an administrative change that I found useful while building and testing the code with a development version of PCRE2.
The second patch reverts the workaround merged in 30b3e9d2 (libselinux:
Workaround for heap overhead of pcre, 2023-01-12) while addressing the increased memory utilization that it was trying to prevent by changing the way the match_data required for each match was being handled.
The last patch changes the single threaded codepath to allow for a similar performance improvement done to the multithreaded codepath by intentionally leaking one match_data that could be reused for all matches.
Carlo Marcelo Arenas Belón (3):
scripts: respect an initial LD_LIBRARY_PATH with env_use_destdir
libselinux: improve performance with pcre matches
libselinux: use a static match_data if single threaded
libselinux/src/regex.c | 111 +++++++++++++++++------------- libselinux/src/selinux_internal.h | 4 ++ scripts/env_use_destdir | 8 ++- 3 files changed, 73 insertions(+), 50 deletions(-)
[1] https://github.com/PCRE2Project/pcre2/issues/194
Signature · 1 line
2.39.0