You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Phillip Rhodes <sp...@rhoderunner.com> on 2007/06/19 21:02:05 UTC

how can i speed up nodeiterator?

Everyone,
I now have jackrabbit in production, and things seem okay for most users.  

The only problem I am having is when some users have more than 200 images, it's very very slow.  
I am doing an xpath query, and looping through the results to obtain the image content (not the bytes, but just properties)

In my search of the archives, I found a respectDocumentOrder, but this does not seem to improve performance.
  <param name="respectDocumentOrder" value="false"/>

I was hoping for some additional ideas on how I can improve performance of the NodeIterator.  I am using the org.apache.jackrabbit.core.state.db.OraclePersistenceManager, if that matters.

Later, when things are stabilized further, I will send out a link with info for this very public application.  We have 22k registered users and they are going to be promoting it via banners, etc... in the coming months.  



Phillip



Re: how can i speed up nodeiterator?

Posted by Alexandru Popescu ☀ <th...@gmail.com>.
On 6/20/07, Phillip Rhodes <sp...@rhoderunner.com> wrote:
> Alex,
> What do you mean by manual navigation?
>

Traversing and filtering the nodes. Indeed this will not work with
user entered searches, but with predefined/parameterized filtering
criterias.

./alex
--
.w( the_mindstorm )p.

> Thanks.
>
> ----- Original Message -----
> From: "Alexandru Popescu ☀" <th...@gmail.com>
> To: users@jackrabbit.apache.org
> Sent: Tuesday, June 19, 2007 3:15:19 PM (GMT-0500) America/New_York
> Subject: Re: how can i speed up nodeiterator?
>
> On 6/19/07, Phillip Rhodes <sp...@rhoderunner.com> wrote:
> > Everyone,
> > I now have jackrabbit in production, and things seem okay for most users.
> >
> > The only problem I am having is when some users have more than 200 images, it's very very slow.
> > I am doing an xpath query, and looping through the results to obtain the image content (not the bytes, but just properties)
> >
> > In my search of the archives, I found a respectDocumentOrder, but this does not seem to improve performance.
> >   <param name="respectDocumentOrder" value="false"/>
> >
> > I was hoping for some additional ideas on how I can improve performance of the NodeIterator.  I am using the org.apache.jackrabbit.core.state.db.OraclePersistenceManager, if that matters.
> >
> > Later, when things are stabilized further, I will send out a link with info for this very public application.  We have 22k registered users and they are going to be promoting it via banners, etc... in the coming months.
> >
>
> I had some problems with the performance of XPath queries in the path.
> Unfortunately, being under heavy pressure I haven't been able to
> diagnosticate the real problem. However, in my case I have switched to
> "manual" navigation which proved to be somewhere like 10-100 times faster.
>
> ./alex
> --
> .w( the_mindstorm )p.
>
> >
> >
> > Phillip
> >
> >
> >
>
>

Re: how can i speed up nodeiterator?

Posted by Phillip Rhodes <sp...@rhoderunner.com>.
Alex,
What do you mean by manual navigation?

Thanks.

----- Original Message -----
From: "Alexandru Popescu ☀" <th...@gmail.com>
To: users@jackrabbit.apache.org
Sent: Tuesday, June 19, 2007 3:15:19 PM (GMT-0500) America/New_York
Subject: Re: how can i speed up nodeiterator?

On 6/19/07, Phillip Rhodes <sp...@rhoderunner.com> wrote:
> Everyone,
> I now have jackrabbit in production, and things seem okay for most users.
>
> The only problem I am having is when some users have more than 200 images, it's very very slow.
> I am doing an xpath query, and looping through the results to obtain the image content (not the bytes, but just properties)
>
> In my search of the archives, I found a respectDocumentOrder, but this does not seem to improve performance.
>   <param name="respectDocumentOrder" value="false"/>
>
> I was hoping for some additional ideas on how I can improve performance of the NodeIterator.  I am using the org.apache.jackrabbit.core.state.db.OraclePersistenceManager, if that matters.
>
> Later, when things are stabilized further, I will send out a link with info for this very public application.  We have 22k registered users and they are going to be promoting it via banners, etc... in the coming months.
>

I had some problems with the performance of XPath queries in the path.
Unfortunately, being under heavy pressure I haven't been able to
diagnosticate the real problem. However, in my case I have switched to
"manual" navigation which proved to be somewhere like 10-100 times faster.

./alex
--
.w( the_mindstorm )p.

>
>
> Phillip
>
>
>


Re: how can i speed up nodeiterator?

Posted by Alexandru Popescu ☀ <th...@gmail.com>.
On 6/19/07, Phillip Rhodes <sp...@rhoderunner.com> wrote:
> Everyone,
> I now have jackrabbit in production, and things seem okay for most users.
>
> The only problem I am having is when some users have more than 200 images, it's very very slow.
> I am doing an xpath query, and looping through the results to obtain the image content (not the bytes, but just properties)
>
> In my search of the archives, I found a respectDocumentOrder, but this does not seem to improve performance.
>   <param name="respectDocumentOrder" value="false"/>
>
> I was hoping for some additional ideas on how I can improve performance of the NodeIterator.  I am using the org.apache.jackrabbit.core.state.db.OraclePersistenceManager, if that matters.
>
> Later, when things are stabilized further, I will send out a link with info for this very public application.  We have 22k registered users and they are going to be promoting it via banners, etc... in the coming months.
>

I had some problems with the performance of XPath queries in the path.
Unfortunately, being under heavy pressure I haven't been able to
diagnosticate the real problem. However, in my case I have switched to
"manual" navigation which proved to be somewhere like 10-100 times faster.

./alex
--
.w( the_mindstorm )p.

>
>
> Phillip
>
>
>

Re: how can i speed up nodeiterator?

Posted by Marcel Reutegger <ma...@gmx.net>.
Phillip Rhodes wrote:
> Is this feature assigned to anyone, would this be something that i could contribute?

afaik, no one is actively working on this issue.

any help is of course greatly appreciated. if you have a patch for JCR-855 
please attach it to the issue and I will be happy to review it.

regards
  marcel

Re: how can i speed up nodeiterator?

Posted by Phillip Rhodes <sp...@rhoderunner.com>.
Is this feature assigned to anyone, would this be something that i could contribute?

Phillip


----- Original Message -----
From: "Marcel Reutegger" <ma...@gmx.net>
To: users@jackrabbit.apache.org
Sent: Friday, June 22, 2007 5:32:07 AM (GMT-0500) America/New_York
Subject: Re: how can i speed up nodeiterator?

Phillip Rhodes wrote:
> In the way that I would have written it, I would have stored all the node
> properties/values, everything i need to construct the Node into the lucene
> index.  In this way, I would just have to construct the Node from the lucene
> document.

there was an recent post on the dev list which suggested exactly this, and 
resulted in a enhancement request. see: http://issues.apache.org/jira/browse/JCR-855

> I suspect that this is not what is occuring, rather, lucene is providing a
> pointer to the node and the node must be constructed via db calls, etc...
> 
> If anyone can provide further detail on this, I would appreciate it.

This is correct. The query handler only provides the UUIDs of the nodes that 
matched the query. The actual Node instance is then retrieved from the 
persistence manager if it is not already cached in jackrabbit.

regards
  marcel


Re: how can i speed up nodeiterator?

Posted by Marcel Reutegger <ma...@gmx.net>.
Phillip Rhodes wrote:
> In the way that I would have written it, I would have stored all the node
> properties/values, everything i need to construct the Node into the lucene
> index.  In this way, I would just have to construct the Node from the lucene
> document.

there was an recent post on the dev list which suggested exactly this, and 
resulted in a enhancement request. see: http://issues.apache.org/jira/browse/JCR-855

> I suspect that this is not what is occuring, rather, lucene is providing a
> pointer to the node and the node must be constructed via db calls, etc...
> 
> If anyone can provide further detail on this, I would appreciate it.

This is correct. The query handler only provides the UUIDs of the nodes that 
matched the query. The actual Node instance is then retrieved from the 
persistence manager if it is not already cached in jackrabbit.

regards
  marcel

Re: how can i speed up nodeiterator?

Posted by Phillip Rhodes <sp...@rhoderunner.com>.
One of my thoughts at this time is looking deeper into jackrabbit at the nodeiterator.  

In the way that I would have written it, I would have stored all the node properties/values, everything i need to construct the Node into the lucene index.  In this way, I would just have to construct the Node from the lucene document.  

I suspect that this is not what is occuring, rather, lucene is providing a pointer to the node and the node must be constructed via db calls, etc...

If anyone can provide further detail on this, I would appreciate it.
Phillip


----- Original Message -----
From: "Marcel Reutegger" <ma...@gmx.net>
To: users@jackrabbit.apache.org
Sent: Wednesday, June 20, 2007 10:05:13 AM (GMT-0500) America/New_York
Subject: Re: how can i speed up nodeiterator?

Phillip Rhodes wrote:
> The only problem I am having is when some users have more than 200 images,
> it's very very slow. I am doing an xpath query, and looping through the
> results to obtain the image content (not the bytes, but just properties)

can you provide some more information? is the time spent executing the query or 
retrieving the nodes?

regards
  marcel


Re: how can i speed up nodeiterator?

Posted by Marcel Reutegger <ma...@gmx.net>.
Phillip Rhodes wrote:
> The only problem I am having is when some users have more than 200 images,
> it's very very slow. I am doing an xpath query, and looping through the
> results to obtain the image content (not the bytes, but just properties)

can you provide some more information? is the time spent executing the query or 
retrieving the nodes?

regards
  marcel