lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <sim...@apache.org>
Subject Re: a optimizable point about solr
Date Thu, 12 May 2011 08:07:20 GMT
Hey good catch :)

we already addressed this issue AFAIK here:
https://issues.apache.org/jira/browse/SOLR-2493

so the question is if we need to do another release since it seems serious.

simon

2011/5/12 shuigen kang <kangsg219@gmail.com>:
> Hi all:
>
>       I was recently used solr to set up a Search Engine for our web site.
> In the process of performance test, I used jprofiler to analyse the
> operational aspect of solr , And found a optimizable point, in the method
>  getLuceneVersion(String path, Version def) of class
> org.apache.solr.core.config. In this method,it will parse the config file
> with xml format each time when be invoked.
>
> it is terrible,look this:
>
> http://dl.iteye.com/upload/picture/pic/89884/00ff1ee5-a156-354d-8eaa-35abdcd1cfa6.jpg
>
> http://dl.iteye.com/upload/picture/pic/89884/00ff1ee5-a156-354d-8eaa-35abdcd1cfa6.jpg
>
> 15.1%+14.2%, it cost 29.3% cpu resource,only a be of little use method.
>
> So I suggest to edit this method like this:
>
> ------------------------------------------------------------------------
>
> public Version getLuceneVersion(String path) {
>
>        if(luceneVersion == null){
>
>           luceneVersion = parseLuceneVersionString(getVal(path, true));
>
>        }
>
>      return luceneVersion;
>
>    }
> ------------------------------------------------------------------------
>
> Only run parseLuceneVersionString() method at this first time to save the
> valuable and limited cpu resource.
>
>
>
> Any problem and what do you think?
>
>
>
> Best regards.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message