> -----Original Message----- > From: Endijs Lisovskis [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 21, 2008 7:29 PM > To: [email protected] > Subject: Re: AW: [fw-general] Zend_Search_Lucene - how to find performance > problem source? > > > I tried to profile script and got some very strange results. > For test i made index from 2000 documents. Index was 6MB in size and > optimized. > > Xdebug made ~500MB large cachegrind file! Is that normal? When I opened > that file with KCacheGrind result was: http://prcentrs.lv/kca.png > > Tests were executed on my notebook - so on server they would run faster. > But > even on notebook (dualcore cpu, 2gb ram) it shouldnt take more than minute > to finish. > > Can anyone understand something from that cachegrind report and tell me - > what is wrong with my script and/or index.
XDebug is not actually best tool for search profiling. Search time hardly depends on indexed data. Luke tool (http://www.getopt.org/luke/) may be very informative. Check also output of the following expressions (it gives actual query execution order): 1. echo Zend_Search_Lucene_Search_QueryParser::parse($queryStr)->__toString(); 2. $query = Zend_Search_Lucene_Search_QueryParser::parse($queryStr); echo $query->rewrite($index)->__toString(); 3. $query = Zend_Search_Lucene_Search_QueryParser::parse($queryStr); echo $query->rewrite($index)->optimize($index)->__toString(); Latest step (or you could start with it :)), you can create JIRA issue with performance problem description, query example and attached index example (or send it directly to me :)). > If that helps - i'm using: > Zend_Search_Lucene_Analysis_Analyzer::setDefault( new > Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive()); Analyzers are used to tokenize documents while indexing and perform some transformations with lexemes while query parsing. So it's important to use the same analyzers while indexing and searching, but they don't actually affect searching process. With best regards, Alexander Veremyev. > > Endijs > > > Stefan Oestreicher-3 wrote: > > > > Are you storing document contents in the index? This will degrade > > performance badly in my experience (the bigger the docs, the worse the > > performance). > > If that's not the case, I'd suggest to profile your application with > > xdebug. This should reveal the culprit in no time. > > > > best regards, > > > > Stefan > > > > > > > > -- > View this message in context: http://www.nabble.com/Zend_Search_Lucene--- > how-to-find-performance-problem-source--tp20085562p20092853.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > > No virus found in this incoming message. > Checked by AVG - http://www.avg.com > Version: 8.0.173 / Virus Database: 270.8.1/1733 - Release Date: 20.10.2008 > 14:52
