jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Problem with NodeIterator
Date Mon, 12 Nov 2007 12:42:07 GMT
Hello Kisu,

> Kisu San wrote:
> 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. 

Hmmm, this is pretty strange. I asked it before I think, but did you
implement your own AccessManager? Although, thinking about it, this
doesn't make any sense, because that might slow down
results.getNodes();, but not it.nextNode(). I am not sure if in some way
you get a lot of RepositoryExceptions in the while loop in fetchNext in
NoteIteratorImpl. Do you happen to have yourkit? Then we might easily be
able to find your bottleneck. Can you otherwise do some debugging and
see if the  while loop in fetchNext is taking long. 

Is it possible by the way that you have like 10k+ nodes with one single
parent? AFAIRC, this is slowing down jackrabbit, so in that case, you
might want to check by creating a few extra subfolders.

Regards Ard

ps I still think this is a user list issue, because AFAIK, it is not a
common problem that everybody experiences.

> 
> 
> 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-tf4790617.html
> #a13704369
> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
> 
> 

Mime
View raw message