Return-Path: X-Original-To: apmail-crunch-dev-archive@www.apache.org Delivered-To: apmail-crunch-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 B716419BD2 for ; Mon, 18 Apr 2016 19:45:25 +0000 (UTC) Received: (qmail 58269 invoked by uid 500); 18 Apr 2016 19:45:25 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 58233 invoked by uid 500); 18 Apr 2016 19:45:25 -0000 Mailing-List: contact dev-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list dev@crunch.apache.org Received: (qmail 58177 invoked by uid 500); 18 Apr 2016 19:45:25 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 58173 invoked by uid 99); 18 Apr 2016 19:45:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 19:45:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7BAE12C1F5A for ; Mon, 18 Apr 2016 19:45:25 +0000 (UTC) Date: Mon, 18 Apr 2016 19:45:25 +0000 (UTC) From: "Steven Ruppert (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CRUNCH-604) Avoid expensive Writables.reloadWritableComparableCodes where possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Steven Ruppert created CRUNCH-604: ------------------------------------- Summary: Avoid expensive Writables.reloadWritableComparableCodes where possible Key: CRUNCH-604 URL: https://issues.apache.org/jira/browse/CRUNCH-604 Project: Crunch Issue Type: Improvement Components: Core Affects Versions: 0.13.0 Reporter: Steven Ruppert Assignee: Josh Wills Every time `setConf` is called on TupleWritable, `Writables.reloadWritableComparableCodes(conf)` is called. Unfortunately, `SequenceFile$Reader.readValue` calls `setConf` every single time. This burns a regrettable amount of CPU time. Attached is a patch that prevents a given TupleWritable instance from reloading the code more than once, as well as a patch to cache (hashCode-wise) reading from the actual hadoop config, which has to run regexes and stuff. I can construe situations where this would break (somehow, you modify the configuration in between reading to two values), but nothing actually sane comes to mind. -- This message was sent by Atlassian JIRA (v6.3.4#6332)