You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by ChadDavis <ch...@gmail.com> on 2010/10/28 23:12:30 UTC
improving efficiency
I'm working on a CMS based on Jackrabbit. The UI is a RIA, of sorts.
The user is presented with a file tree structure. If they are at the
root folder, then the tree is pretty big. I *need* to have the whole
data model in order to build the file tree in the UI, but it's an
obviously costly act. I'm now trying to determine my options for
making this process more efficient. Here's a couple I've thought of,
and I'm hoping that someone will provide some guidance.
1) I could load only a portion of the tree, then use Ajax techniques
to lazy load the deeper folders in the tree as the user works through
them
2) I could implement a caching layer in my application that holds the
tree structure. It could track it's stale branches and only refresh
those when necessary
3) I'm thinking that I could somehow just use the Jackrabbit API
better . . . really, all I need are the names of the children;
currently I'm creating the "folder" and "document" objects for the
whole tree as I create the tree. Perhaps it's cleaner to just get the
children by name, or uuid.
How have other people handled this?
Re: improving efficiency
Posted by Rakesh Vidyadharan <ra...@sptci.com>.
On Oct 29, 2010, at 2:05 PM, ChadDavis <ch...@gmail.com> wrote:
> On Fri, Oct 29, 2010 at 12:57 PM, Rakesh Vidyadharan <ra...@sptci.com> wrote:
>>
>> On 28 Oct 2010, at 16:12, ChadDavis wrote:
>>
>>> I'm working on a CMS based on Jackrabbit. The UI is a RIA, of sorts.
>>> The user is presented with a file tree structure. If they are at the
>>> root folder, then the tree is pretty big. I *need* to have the whole
>>> data model in order to build the file tree in the UI, but it's an
>>> obviously costly act. I'm now trying to determine my options for
>>> making this process more efficient. Here's a couple I've thought of,
>>> and I'm hoping that someone will provide some guidance.
>>>
>>> 1) I could load only a portion of the tree, then use Ajax techniques
>>> to lazy load the deeper folders in the tree as the user works through
>>> them
>>
>> I use this technique and have not had any issues.
>>
>
> How much of the data model do you pull down on the first request? Do
> you wait for the user to click on a folder to get more?
I have a configured page size that I use with the node iterator for paginating potentially large nodes. Yes, I wait for user interaction to pull in data for a selected node. The tree model is initially populated with just the top level nodes.
Rakesh
Re: improving efficiency
Posted by ChadDavis <ch...@gmail.com>.
On Fri, Oct 29, 2010 at 12:57 PM, Rakesh Vidyadharan <ra...@sptci.com> wrote:
>
> On 28 Oct 2010, at 16:12, ChadDavis wrote:
>
>> I'm working on a CMS based on Jackrabbit. The UI is a RIA, of sorts.
>> The user is presented with a file tree structure. If they are at the
>> root folder, then the tree is pretty big. I *need* to have the whole
>> data model in order to build the file tree in the UI, but it's an
>> obviously costly act. I'm now trying to determine my options for
>> making this process more efficient. Here's a couple I've thought of,
>> and I'm hoping that someone will provide some guidance.
>>
>> 1) I could load only a portion of the tree, then use Ajax techniques
>> to lazy load the deeper folders in the tree as the user works through
>> them
>
> I use this technique and have not had any issues.
>
How much of the data model do you pull down on the first request? Do
you wait for the user to click on a folder to get more?
> Rakesh
>
Re: improving efficiency
Posted by Rakesh Vidyadharan <ra...@sptci.com>.
On 28 Oct 2010, at 16:12, ChadDavis wrote:
> I'm working on a CMS based on Jackrabbit. The UI is a RIA, of sorts.
> The user is presented with a file tree structure. If they are at the
> root folder, then the tree is pretty big. I *need* to have the whole
> data model in order to build the file tree in the UI, but it's an
> obviously costly act. I'm now trying to determine my options for
> making this process more efficient. Here's a couple I've thought of,
> and I'm hoping that someone will provide some guidance.
>
> 1) I could load only a portion of the tree, then use Ajax techniques
> to lazy load the deeper folders in the tree as the user works through
> them
I use this technique and have not had any issues.
Rakesh