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

Remove the codes which create a new HttpSolrServer for each method invocation. Create a HttpSolrServer for each EJB and reuse it for each method call. #2713

Merged
merged 1 commit into from
Nov 2, 2015

Conversation

pengchengluo
Copy link
Contributor

In the class of edu.harvard.iq.dataverse.search.SearchServiceBean, every search request create a HttpSolrServer object. However, HttpSolrServer has a method named shutdown() which releases some resources. So the code must invoke the shutdown method.

Besides, when construct the HttpSolrServer object, it will create a HttpClient. This process is expensive and there is no need to create a new HttpSolrServer for every search request.

…vocation. Create a HttpSolrServer for each EJB and reuse it for each method call.
@pdurbin
Copy link
Member

pdurbin commented Nov 1, 2015

@pengchengluo thanks for this pull request! I'm planning on trying it locally and seeing if it makes much of a difference with #2036 for example.

@pdurbin pdurbin added this to the 4.3 milestone Nov 1, 2015
@pdurbin pdurbin self-assigned this Nov 1, 2015
@pdurbin
Copy link
Member

pdurbin commented Nov 1, 2015

Oh, this pull request is for #2706 by the way.

@pdurbin pdurbin merged commit c6d444f into IQSS:4.3 Nov 2, 2015
@pdurbin
Copy link
Member

pdurbin commented Nov 2, 2015

From what I can tell, this pull request doesn't do any harm. There's an indication at https://github.com/pengchengluo that it's more efficient so I went ahead and merged it in. I haven't yet done any speed comparison before and after with #2036.

Thanks @pengchengluo !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants