Return-Path: X-Original-To: apmail-manifoldcf-dev-archive@www.apache.org Delivered-To: apmail-manifoldcf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E10D99E44 for ; Thu, 11 Dec 2014 12:08:14 +0000 (UTC) Received: (qmail 97046 invoked by uid 500); 11 Dec 2014 12:08:14 -0000 Delivered-To: apmail-manifoldcf-dev-archive@manifoldcf.apache.org Received: (qmail 96995 invoked by uid 500); 11 Dec 2014 12:08:14 -0000 Mailing-List: contact dev-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list dev@manifoldcf.apache.org Received: (qmail 96983 invoked by uid 99); 11 Dec 2014 12:08:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2014 12:08:14 +0000 Date: Thu, 11 Dec 2014 12:08:14 +0000 (UTC) From: "Aeham Abushwashi (JIRA)" To: dev@manifoldcf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CONNECTORS-1118) Documents processed by the shared drive connector incur an unnecessary synchronisation hit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CONNECTORS-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14242450#comment-14242450 ] Aeham Abushwashi commented on CONNECTORS-1118: ---------------------------------------------- The profiler trace looks much better now. Thank you! > Documents processed by the shared drive connector incur an unnecessary synchronisation hit > ------------------------------------------------------------------------------------------ > > Key: CONNECTORS-1118 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1118 > Project: ManifoldCF > Issue Type: Improvement > Components: Framework core > Affects Versions: ManifoldCF 1.7.2 > Reporter: Aeham Abushwashi > Assignee: Karl Wright > Fix For: ManifoldCF 1.8, ManifoldCF 2.0 > > > Each document processed by the shared drive connector is passed through SharedDriveConnector#checkInclude to verify whether the document is eligible for ingestion. The calls made here to WorkerThread$ProcessActivity#checkMimeTypeIndexable and WorkerThread$ProcessActivity#checkLengthIndexable are unnecessarily costly as they each create a fresh instance of IncrementalIngester$PipelineConnections on every call. The constructor of IncrementalIngester$PipelineConnections can be very expensive due to the loading of output connection objects, which in turn requires some locking (via ZK - in a distrubuted environment). > The other area of inefficiency is in WorkerThread$ProcessActivity#processDocumentReferences. This method creates new instances of PriorityCalculator using the less-efficient 3-arg constructor. This can be addressed using the same pattern implemented for CONNECTORS-1094 > To highlight the impact of the above calls, I profiled an active worker thread for 40 minutes. During that window, it spent ~23 minutes in SharedDriveConnector#checkInclude and its callees + 9 minutes creating instances of PriorityCalculator. > I've seen the above issues when using the shared drive connector but I think other connectors too could be impacted - depending on how they're implemented. -- This message was sent by Atlassian JIRA (v6.3.4#6332)