Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-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 E5247FB68 for ; Tue, 23 Apr 2013 20:15:18 +0000 (UTC) Received: (qmail 61032 invoked by uid 500); 23 Apr 2013 20:15:17 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 60965 invoked by uid 500); 23 Apr 2013 20:15:17 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 60929 invoked by uid 99); 23 Apr 2013 20:15:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 20:15:17 +0000 Date: Tue, 23 Apr 2013 20:15:17 +0000 (UTC) From: "Uri Laserson (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AVRO-1304) Python Avro match_schemas called redundantly 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/AVRO-1304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Uri Laserson updated AVRO-1304: ------------------------------- Attachment: AVRO-1304.patch > Python Avro match_schemas called redundantly > -------------------------------------------- > > Key: AVRO-1304 > URL: https://issues.apache.org/jira/browse/AVRO-1304 > Project: Avro > Issue Type: Bug > Components: python > Affects Versions: 1.7.4 > Reporter: Uri Laserson > Attachments: AVRO-1304.patch > > > DatumReader.match_schemas(writers_schema, readers_schema) is called on every single read from the DatumReader. However, for almost every read, the schemas used are the object members self.writers_schema and self.readers_schema. match_schemas should be checked only once in this case, and only when the object members are modified. This takes up 20% of my parse time upon profiling. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira