jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kisu San <Kishore....@gmail.com>
Subject Re: Problem with NodeIterator
Date Tue, 13 Nov 2007 11:02:50 GMT

Hi Marcel,

>>
>>what you can try is quickly add an 'order by @jcr:score' to your query
statement
>>and see what happens. 

This has significantly increased the performance. Thanks Marcel.  Now it is
taking 9547 milli seconds to get 1000 matching nodes out of 10,000 nodes. 
Initially it was 222,406 milli seconds.

Anymore tips to improve this performance further?



>> param name="respectDocumentOrder" value="false"/

I have tried this some time back, but it did not help at all. I have created
the nodes with this value 'true' and then changed to 'false' at the time of
firing query.

It seems that jackrabbit did not pick up these changes. I thought when I
logout and login to session, it will pick up the new repository.xml changes. 
Am I wrong here. Do I need to do anything else.

regards
Kishore





Marcel Reutegger wrote:
> 
> there is also a default configuration setting which may affect
> performance. if 
> your query does not have an 'order by' clause the result nodes will be
> returned 
> in document order. this is a rather expensive operation and will be
> performed on 
> the first access to Node/RowIterator.hasNext/next()
> 
> what you can try is quickly add an 'order by @jcr:score' to your query
> statement 
> and see what happens.
> 
> to permanently disable document order add the following parameter to the 
> SearchIndex element in repository.xml and any existing workspace.xml:
> 
> 
> 
> see also: http://wiki.apache.org/jackrabbit/Search
> 
> regards
>   marcel
> 
> Kisu San wrote:
>> Hi Arn,
>> 
>> Thanks for your reply. All these nodes are attached to one Parent Node.
>> Even
>> nodeIterator.hasNext() also taking lot of time.  There is definitely
>> something wrong, while accessing  large node sets.
>> 
>> I think, 10K nodes under one parent node is quite common thing I guess. I
>> am
>> doing this whole exercise to see if jackrabbit is best bet for CMS
>> implementation for a major European automotive company. It will be a very
>> big implementation and 10K nodes would be quite common.
>> 
>> Ps. now i created this thread in users. 
>> 
>> 
>>>>> original query
>> 
>> Dear All,
>> 
>> I have a problem with NodeIterator, which is taking lot of time. I am
>> using
>> Jackrabbit 1.3.3 and jcr 1.0 jars.
>> 
>> Below is my code, my query is been executed in a reasonable time, but
>> when I
>> try to loop through the result set using NodeIterator it is taking time.
>> I
>> have 10,000 nodes out of which 100 are matching nodes (satisfying where
>> clause of query)   And each of these 1000 nodes associate with a binary
>> file.
>> 
>>         QueryResult results = getQueryResults(query); ==> is executing in
>> reasonable time (XPath query)
>>                
>>         NodeIterator it = results.getNodes(); ==> is executing in
>> reasonable
>> time
>> 
>>         for (int i= 0; i < it.getSize(); i++){
>>                         Node n = it.nextNode();  ==> is taking lot of
>> time.
>> 
>> 
>> I have tried with rowIterator and it is the same case. Some one from this
>> forum told me that this problem was fixed in one of the earlier releases.
>> Can anyone give me any in sites of how this can be fixed. Or What is the
>> other alternative to use NodeIterator.
>> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-NodeIterator-tf4791277.html#a13723780
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message