Re: silvafind

Marc Petitmermet <[email protected]>
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
On 16. Mrz 2007, at 11:10 Uhr, eric casteleijn wrote:

>> what about the performance impact because of this additional loop?  
>> i guess (but i don't have any hard figures) that overall the  
>> search results are presented faster because the second batch loop  
>> is smaller and there are less conditions to be evaluated and less  
>> translations to be made.
>
>
> The performance impact is not so much in the loop, as in that with  
> this patch, every single object in the result set, not just in the  
> batch, and that for every page view.

oh, well. i have to agree, it was late and i did not think about  
this. we could at least make sure that "results python:[item for item  
in resultparts[0] if model.isViewableForUser(item)]" is only  
evaluated once under the condition="not:batch" or something  
similar... and if you don't allow empty string searches and don't  
allow common words (i mysql these words are called stopwords [1]) the  
impact should be acceptable because the result sets are probably not  
huge...

regards,
marc


[1] http://dev.mysql.com/doc/refman/5.0/en/fulltext-stopwords.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.