Skip to content
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

WW-4062 Further optimisation of OgnlException caching #1021

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

kusalk
Copy link
Member

@kusalk kusalk commented Aug 13, 2024

WW-4062

Follow-up for #1013 - I was looking at the flame graph for this particular code flow (this is before the previous PR was merged) and observed that filling the stack trace is the largest contributor. Thus, we can gain more performance here by not refreshing the stack trace for cached exceptions. Given most of these exceptions are caught silently I don't expect the lack of stack trace to be an issue. If the stack trace is necessary for debugging purposes, then we can temporarily disable caching using struts.ognl.enableExpressionCache=false.

As the Jira issue suggests - this is primarily an issue for applications using the Velocity integration where the null fallback behaviour results in these invalid OGNL expressions attempting to be compiled repeatedly.

image

@kusalk kusalk requested a review from lukaszlenart August 13, 2024 08:41
@kusalk kusalk force-pushed the WW-4062-ognl-exc-cache branch from 04905ce to 0fd8551 Compare August 13, 2024 09:15
Copy link

@kusalk kusalk merged commit 9b259ae into master Aug 13, 2024
7 of 8 checks passed
@kusalk kusalk deleted the WW-4062-ognl-exc-cache branch August 13, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants