You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Edgar Poce <ed...@gmail.com> on 2005/03/18 20:17:06 UTC
NodeReferences handling
Hi
Is there any reason for handling NodeReferences in a different way
that NodeStates and PropertyStates?. It seems this is an issue for PMs
other than ObjectPM and XMLPM. It affects performance unnecessarily,
especially when dealing with a big amount of references.
Thanks in advance
Edgar
Re: NodeReferences handling
Posted by Dominique Pfister <do...@day.com>.
Edgar Poce wrote:
> I would. Given the current design with 100 references and only 1
> modified would need 1 delete query and 100 inserts!!!
Well, considering the very simple NodeReferences data structure, 1
insert statement with a values clause will probably suffice, won't it ;-)
Dominique
Re: NodeReferences handling
Posted by Edgar Poce <ed...@gmail.com>.
Hi Dominique
> I wouldn't call it an issue.
I would. Given the current design with 100 references and only 1
modified would need 1 delete query and 100 inserts!!!
> In the case of ORM PM you found out
> yourself that the problematic part was caused by a referential integrity
> test that was supposed to fail.
>
No, I found that the problematic part was the NodeReferences handling.
But I was talking about that when serged asked a question about another
issue.
>
> Regards
> Dominique
>
regards
edgar
Re: NodeReferences handling
Posted by Dominique Pfister <do...@day.com>.
Edgar Poce wrote:
> Is there any reason for handling NodeReferences in a different way that
> NodeStates and PropertyStates?.
NodeReferences simply contain a list of UUIDs that reference the
corresponding Node. They are not cached in any layer of Jackrabbit. They
are primarily used to determine when a node is no longer referenced by
any REFERENCE property and can therefore safely be removed.
> It seems this is an issue for PMs other
> than ObjectPM and XMLPM. It affects performance unnecessarily,
> especially when dealing with a big amount of references.
I wouldn't call it an issue. In the case of ORM PM you found out
yourself that the problematic part was caused by a referential integrity
test that was supposed to fail.
But you're right that for nodes being highly referenced, additions or
removals are rather expensive. We should probably introduce a
"modification-aware" NodeReferences object that is able to tell what
references have been added or removed.
Regards
Dominique