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

Set OptimizedAccessorFactory.noOptimization=true by default #1525

Closed
wants to merge 1 commit into from

Conversation

jimma
Copy link
Contributor

@jimma jimma commented Mar 25, 2021

No description provided.

Signed-off-by: Jim Ma <ema@redhat.com>
Copy link
Member

@lukasj lukasj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What problem on which JDK is this trying to resolve? In all cases I've seen on JDK 11+ so far was that the caller did not support multi-release jar files (ie Ant <=1.10.6); in such case using -Djdk.util.jar.enableMultiRelease=force is the way to go

@jimma
Copy link
Contributor Author

jimma commented Mar 25, 2021

@lukasj I see there is a huge performance decrease in jaxb 2.3.3 with jdk8 with this default value OptimizedAccessorFactory.noOptimization=false . From my local test, I don't see there is some performance improvement with this optimization and JDK11. So I think it's better set this value as true as it's backward compatible and faster on different JDK versions.

@lukasj
Copy link
Member

lukasj commented Mar 25, 2021

Since JDK 9, this is off by default (noOptimization is true). Can you share a testcase showing the decrease on JDK8?

@jimma
Copy link
Contributor Author

jimma commented Mar 25, 2021

@lukasj Can you please point me the source code to set this off (noOptimazation is true) by default since JDK9 ?

@lukasj
Copy link
Member

lukasj commented Mar 25, 2021

see the Injector which does nothing and is supposed to be used

@jimma
Copy link
Contributor Author

jimma commented Mar 26, 2021

Thanks @lukasj .

Can you share a testcase showing the decrease on JDK8?

I pushed the test case project for the performance issue with JDK8: https://github.com/jimma/jaxb233perfmance . The steps to reproduce this issue are listed on README. Please check.

@jimma
Copy link
Contributor Author

jimma commented Apr 1, 2021

@lukasj Did you get time to look at the producer ? The optimization change in jaxb 2.3.3. makes creates JAXBContext instance 10 times slower than jaxb 2.3.2.

@lukasj
Copy link
Member

lukasj commented Apr 8, 2021

yup, you're right. Anyway, correct way to fix it is to just remove the code completely instead of setting variable to true - that can be done via system property even now

@jimma
Copy link
Contributor Author

jimma commented Apr 9, 2021

OK. @lukasj , I reverted this change with #1533. Please review.

@lukasj
Copy link
Member

lukasj commented Apr 28, 2021

superseded by #1533

@lukasj lukasj closed this Apr 28, 2021
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.

None yet

2 participants