On 2/8/07, Stefan Guggisberg wrote: > On 2/7/07, Jukka Zitting wrote: > > Hi, > > > > On 2/7/07, stefan@apache.org wrote: > > > public Node getNodeByUUID(UUID uuid) throws ItemNotFoundException, RepositoryException { > > > NodeImpl node = getNodeById(new NodeId(uuid)); > > > + // since the uuid of a node is only exposed through jcr:uuid declared > > > + // by mix:referenceable it's rather unlikely that a client can possibly > > > + // know the internal uuid of a non-referenceable node; omitting the > > > + // check for mix:referenceable seems therefore to be a reasonable > > > + // compromise in order to improve performance. > > > +/* > > > if (node.isNodeType(QName.MIX_REFERENCEABLE)) { > > > return node; > > > } else { > > > // there is a node with that uuid but the node does not expose it > > > throw new ItemNotFoundException(uuid.toString()); > > > } > > > +*/ > > > + return node; > > > } > > > > Sounds reasonable, but I'm not convinced that the performance gain is > > noticeable enough to justify the change. What's the access pattern > > we're trying to speed up? > > well, applications that make *heavy* use of Node.getNodeByUUID do of course i meant Session.getNodeByUUID... cheers stefan > benefit considerably as shown by our profiling data. > > cheers > stefan > > > > > BR, > > > > Jukka Zitting > > >