Return-Path: Delivered-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Received: (qmail 49187 invoked from network); 25 Jan 2011 15:57:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jan 2011 15:57:11 -0000 Received: (qmail 85291 invoked by uid 500); 25 Jan 2011 15:57:11 -0000 Delivered-To: apmail-incubator-clerezza-dev-archive@incubator.apache.org Received: (qmail 85233 invoked by uid 500); 25 Jan 2011 15:57:10 -0000 Mailing-List: contact clerezza-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: clerezza-dev@incubator.apache.org Delivered-To: mailing list clerezza-dev@incubator.apache.org Received: (qmail 85077 invoked by uid 99); 25 Jan 2011 15:57:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jan 2011 15:57:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jan 2011 15:57:08 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0PFul56009372 for ; Tue, 25 Jan 2011 15:56:47 GMT Message-ID: <6651397.190361295971007067.JavaMail.jira@thor> Date: Tue, 25 Jan 2011 10:56:47 -0500 (EST) From: "Hasan (JIRA)" To: clerezza-dev@incubator.apache.org Subject: [jira] Created: (CLEREZZA-409) Various methods in SecuredTripleCollection use iterator() of the wrapped TripleCollection instead of delegating to the corresponding method in the wrapped TripleCollection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Various methods in SecuredTripleCollection use iterator() of the wrapped TripleCollection instead of delegating to the corresponding method in the wrapped TripleCollection --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Key: CLEREZZA-409 URL: https://issues.apache.org/jira/browse/CLEREZZA-409 Project: Clerezza Issue Type: Improvement Reporter: Hasan Assignee: Hasan The contains method of SecuredTripleCollection looks as follows: @Override public boolean contains(Object o) { checkRead(); Iterator e = wrapped.iterator(); if (o==null) { while (e.hasNext()) if (e.next()==null) return true; } else { while (e.hasNext()) if (o.equals(e.next())) return true; } return false; } Calling wrapped.iterator() (which will lead to graph filtering by no specification of subject, predicate, and object ) and then iterating through the result set is expensive. Instead, the contains method could be implemented as follows: @Override public boolean contains(Object o) { checkRead(); return wrapped.contains((Triple) o); } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.