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

XMLPropertyListParser's getDocBuilder method need not be synchronized #39

Closed
mailniranjan opened this issue May 23, 2017 · 1 comment
Closed

Comments

@mailniranjan
Copy link
Contributor

https://github.com/3breadt/dd-plist/blob/master/src/main/java/com/dd/plist/XMLPropertyListParser.java#L91 is a synchronized method and is causing performance problems in our peak load testing.

This method was synchronized from the first commit. (ad6ecc4#diff-2c27b48e0134dc885800b0487859238aR71). I can understand that there are initializing the docBuilderFactory variable lazily so that was the reason that method was synchronized.

With the current code, (https://github.com/3breadt/dd-plist/blob/master/src/main/java/com/dd/plist/XMLPropertyListParser.java#L49), the factory is initialized eagerly. So, the method need not be synchronized now.

@3breadt
Copy link
Owner

3breadt commented Jul 5, 2017

Thanks for your contribution.

@3breadt 3breadt closed this as completed Jul 5, 2017
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