Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DF2C2200BD4 for ; Thu, 1 Dec 2016 13:29:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DDF12160B26; Thu, 1 Dec 2016 12:29:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3F430160B0B for ; Thu, 1 Dec 2016 13:29:59 +0100 (CET) Received: (qmail 30286 invoked by uid 500); 1 Dec 2016 12:29:58 -0000 Mailing-List: contact oak-issues-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-issues@jackrabbit.apache.org Received: (qmail 30252 invoked by uid 99); 1 Dec 2016 12:29:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2016 12:29:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5CE4A2C03DB for ; Thu, 1 Dec 2016 12:29:58 +0000 (UTC) Date: Thu, 1 Dec 2016 12:29:58 +0000 (UTC) From: "Stefan Egli (JIRA)" To: oak-issues@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (OAK-5186) ChangeSetFIlterImpl: support many includePaths by filtering for 1st path name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 01 Dec 2016 12:30:00 -0000 [ https://issues.apache.org/jira/browse/OAK-5186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Egli updated OAK-5186: ----------------------------- Priority: Blocker (was: Major) > ChangeSetFIlterImpl: support many includePaths by filtering for 1st path name > ----------------------------------------------------------------------------- > > Key: OAK-5186 > URL: https://issues.apache.org/jira/browse/OAK-5186 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core > Affects Versions: 1.5.14 > Reporter: Stefan Egli > Priority: Blocker > Fix For: 1.6 > > Attachments: OAK-5186.patch > > > When there is a large number of include paths in the ChangeSetFilterImpl and combine that with a large-ish ChangeSet (many paths) then the comparison becomes expensive, as there is a loop with each ChangeSet-path, then looping through each include path. Basically an {{O(n*m)}}. > A probably ideal solution would be to implement a tree with the tree items be the path elements. And have two sets of trees: the filter one and the ChangeSet one. > A simpler and perhaps 'good enough' solution could be to just look at the first level name of both the filter include paths: if a ChangeSet path's first level name is not in that set, then it can't be included. That would allow to skip the pattern comparison (which is slower even though it is a compiled {{Pattern}}). -- This message was sent by Atlassian JIRA (v6.3.4#6332)