jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <tobias.bocane...@day.com>
Subject Re: Lack of performance and possible optimization
Date Sat, 28 Jan 2006 13:56:39 GMT
hi sirene,
if you have no further structure information (which is not very
typical), you would
invent some hierarchy eg, you create a random id, and make every level
max 256 nodes wides. for example a node with the id:
0x0123456789abcdef
you could be stored at: /01/23/45/6789abcdef. it usually does not make sense to
divide further, since with 4 levels, you would already have 2^32
leaves, which is enough for your example.

you can then access the node by a simple:

Node node = (Node) Session.getItem("/01/23/45/6789abcdef");

If you don't need to control the way your 'id' is generated, you can
also create referenceable nodes, and use it's UUID as id. your
suggestion of how to access the node is probably the least favorable.
you don't leverage any of the builtin mechanisms of the repository:
neither path, nor uuid, nor search.

maybe if you explain what type of content you want to store, we might
be able to help you with modeling the nodetypes and figure out an
appropriate content layout.

regards, toby

On 1/28/06, sirène vip <sirene_vip@hotmail.com> wrote:
> Hello,
>
> I have a question about opitmisation and performance.
>
> Supposing that I have  1'000'000 nodes to store in my tree under the root
> node, where each node has system-generated unique ID.
>
> Then in a later phase, I want to unstore one node with a specfic ID. What
> I'm doing currently is iterating over these nodes and for each node, getting
> its ID and comparing it the ID of the node to be unstored.
>
> I was wondering about the performance of such a solution and what other
> alternatives exist in order to optimize it.
>
> Thank you.
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>


--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message