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

Performance Issue in JDK 21 #347

Open
afattahi54 opened this issue Jan 4, 2025 · 4 comments
Open

Performance Issue in JDK 21 #347

afattahi54 opened this issue Jan 4, 2025 · 4 comments
Milestone

Comments

@afattahi54
Copy link

Recently we have upgrade the struts 6.7.0 project from JDK 1.8 to JDK 21. ( The struts is using ognl 3.3.5 ). After upgrade we have faced performance issues on loading jsp files and running actions.

While googling to find some hints, we have find that others also have same issues when switching to struts 7.0, which of course they had JDK upgrade too.

A performance test at https://issues.apache.org/jira/browse/WW-5505?jql=project%20%3D%20WW mentioned that the Ognl.getValue may have performance issues.

I tried to dig in Ognl.getValue code and the only thing that I guess is the the reflection mechanism which have changed from 1.8 to 21 may cause issues.

@lukaszlenart
Copy link
Collaborator

OGNL won't work on Java 21 because of SecurityManager which was removed in that version of Java. I already prepared a PR to deprecate support for SM in 3.4.x and then release a new 3.5.x version using Java 17 as minimum.

@lukaszlenart lukaszlenart added this to the 3.5.0 milestone Jan 4, 2025
@afattahi54
Copy link
Author

Thanks for the comment. Looking forward to the PR

Mean while, by "Don't work" that you have mentioned, I want to clarify that the we do not face any error or exception, the application works when the site load is low , but we face a drastic performance dropdown when the site load increases.

Can you also help me with these ( I can ask them in struts 2 jira too )

  1. Will be a Struts 6.x.x release which work with OGNL 3.5.x and JDK 21 ? This will be a great help as it will break down the migration step in two distinct steps:
    1.1. First we will upgrade to jdk 21 on Struts 6
    1.2 Second we will upgrade to Struts 7
  2. I see that Struts 7 uses OGNL 3.4.x. Does it mean that the Struts 7 also needs to be migrated to OGNL 3.5.x

@lukaszlenart
Copy link
Collaborator

This is wrong place to ask question about Struts.

@lukaszlenart
Copy link
Collaborator

And I would recommend to use a Java profiler (VisualVM should good enough) to detect where the problem is - create a small app to reproduce the problem and profile it.

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

No branches or pull requests

2 participants