additional remarks: I used solr with version 3.1 -----邮件原件----- 发件人: [email protected] [mailto:[email protected]] 代表 Simon Willnauer 发送时间: 2011年5月12日 16:07 收件人: shuigen kang 抄送: [email protected]; 卜沉 主题: Re: a optimizable point about solr
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 <[email protected]>: > 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. > > This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you. 本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。
