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

Reuse instances of DataTypeFactory #243

Merged
merged 1 commit into from Jun 1, 2014

Conversation

Projects
None yet
2 participants
@malaporte

DatatypeFactory.newInstance is a costly call, and shows up pretty high in the profiler when performing many quick SOAP requests. I've arranged for the factory to be reused accross multiple calls.

According to the doc it's not guaranteed to be thread safe (although the implementation I'm using certainly is), so I used a ThreadLocal to get one instance per thread.

DatatypeFactory.newInstance is a costly call, and shows up pretty hig…
…h in the profiler when performing many quick SOAP requests. I've arranged for the factory to be reused accross multiple calls.

According to the doc it's not guaranteed to be thread safe (although the implementation I'm using certainly is), so I used a ThreadLocal to get one instance per thread.

eed3si9n added a commit that referenced this pull request Jun 1, 2014

@eed3si9n eed3si9n merged commit 69fcb20 into eed3si9n:master Jun 1, 2014

@malaporte malaporte deleted the coveo:Shared-DataTypeFactory branch Jun 2, 2014

@eed3si9n eed3si9n added this to the 1.2.0 milestone Jun 8, 2014

@eed3si9n eed3si9n added the enhancement label Jun 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment