Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E2C691A6 for ; Thu, 15 Mar 2012 10:06:24 +0000 (UTC) Received: (qmail 44977 invoked by uid 500); 15 Mar 2012 10:06:24 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 44935 invoked by uid 500); 15 Mar 2012 10:06:24 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 44923 invoked by uid 99); 15 Mar 2012 10:06:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 10:06:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stefan.guggisberg@gmail.com designates 209.85.210.170 as permitted sender) Received: from [209.85.210.170] (HELO mail-iy0-f170.google.com) (209.85.210.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 10:06:18 +0000 Received: by iaeh11 with SMTP id h11so7826977iae.1 for ; Thu, 15 Mar 2012 03:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lI3DcYZ+IaB3R1iGynVUjeuXJcTfddm1DD7EFWd+s2c=; b=l6nw1SVi4lR1iSwYhvYsNkbnux6sytdLpDGi2fSO+e+jkablrtnJUWWzIssRWZGj/l ZcXnfIgN3dMP+W7pXFg+tPqY3j8UdxWPjoITEmnepNQc+B0cKSYTS80Kri+i1mq5eEux tz83ZZNN69vGyd1Mr1vi3nl9UIzJmH+xr5f5+Nj2XD8LKg0URQDZMPnaIKCkEz418msS qsSmE6ltinovJVFa6bn2XZqGP7EqWQZX2dixpJhcb5ORXXvEg/NLIx0Y2RGVcxkxCPyZ Hwqcj9iXWtUWSWiKB4kX02cOOvP0q+ui1vqvgR+FT4m1oEeTqAlub1jLJfn9x3cbZCWM 9jdA== MIME-Version: 1.0 Received: by 10.50.192.196 with SMTP id hi4mr8326576igc.55.1331805957308; Thu, 15 Mar 2012 03:05:57 -0700 (PDT) Received: by 10.42.174.1 with HTTP; Thu, 15 Mar 2012 03:05:57 -0700 (PDT) In-Reply-To: References: <4F60A2FB.8010203@gmx.de> Date: Thu, 15 Mar 2012 11:05:57 +0100 Message-ID: Subject: Re: Semantics of MicroKernel.getNodes() From: Stefan Guggisberg To: oak-dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 15, 2012 at 9:57 AM, Bart van der Schans wrote: > Hi, > > On Wed, Mar 14, 2012 at 2:54 PM, Julian Reschke wrote: >> Hi there, >> >> I'm looking at MicroKernel.getNodes(), and I believe the semantics might >> perform non-optimal unless we get the property filtering right. >> >> A typical use case always is browsing a repository using a tree view. >> >> A tree view usually needs, given a node N: >> >> - all or a subset of all properties of node N >> >> - the set of child node names, and for each of these child nodes, a >> predefined set of properties that will allow the caller to decorate the node >> properly -- such as whether it's a container, and maybe the type). > > Not sure if it matters at all for this specific thread, but another > very common use case with trees: > - a check if node N has children or not there's the system generated :childNodeCount property and there's also the getChildNodeCount(String path, String revId) method. cheers stefan > > That check should/could be a lot more lightweight than fetching a list > of child node names. > > Regards, > Bart