-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache compiled regexes in analyzer #1335
Conversation
@microsoft-github-policy-service agree company="Netcraft" |
Thanks! Does it make sense to compile the regexes during |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I had originally implemented like that, however |
Can we do both? compile a-priori and re-compile if flags change? |
That would mean duplicating the default flags into |
I see. Thanks! merged. |
Change Description
This change caches the compiled regexes of
Pattern
s inpresidio-analyzer
.A large portion of time is spent compiling the regex patterns when calling
/analyze
on thepresidio-analyzer
. For the following request:the original flame graph (attached as the first image) shows that over 50% of the duration is taken up with these compilations.
The second flame graph (attached as the second image) shows the improvement following these changes after the first request has cached the compiled regexes.
Checklist