Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A6FE517ED8 for ; Wed, 29 Oct 2014 08:45:27 +0000 (UTC) Received: (qmail 93431 invoked by uid 500); 29 Oct 2014 08:45:27 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 93402 invoked by uid 500); 29 Oct 2014 08:45:27 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 93391 invoked by uid 99); 29 Oct 2014 08:45:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 08:45:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brane@wandisco.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-wg0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 08:45:01 +0000 Received: by mail-wg0-f52.google.com with SMTP id b13so737195wgh.25 for ; Wed, 29 Oct 2014 01:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wandisco.com; s=gapps; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=tMqU8kfpoH5EnEcvtqX1UnqPyZfpqbdhtZ9XV2/35bw=; b=M0YyRxBDCFohHvM4zSRfB1SLVuANEWn3JKFsWdXKi8yhlv74bB6vuayoYaXbn2Mqbj 0fwVfYbo+C7kAIWWKPw5aCVV3QfvSRT+w4tMrmVCEbJIrxfByMytSvCqV9L4xGZpmm5Z /LUvUsPzqTldeJn3VLA7zmIct7NFENCdUN3lQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=tMqU8kfpoH5EnEcvtqX1UnqPyZfpqbdhtZ9XV2/35bw=; b=PV9/fRuRADN+Rfb0WvUKqeqPE+oWhR7eFDCfPCvwstHlp2vPaNWi/OBAcEePGWz9/B /9uiJ2IwTF8HRPNRI3ywN3bi4ZJm6D/lnYl7DA6Gh4/sMSLkMqkl+UdzafD5QJq7/g/J NmMMlp+6RJHb6qDEAXlnx7bWJESEiyEV1JLIBTpH/uCi1VQ10R+iwSv/IoivZvlpeNI5 QKJRwYl/tsSBDdcuo1zzPYYOYXDuSWVgdfUIAV+jKAm6s8k/NIaGxYTgni3Z2v3UTwVw Q6jHoCfiCpmhZXWp0Vymf2Sih6alzc76eOrR2PgMrTp3Ohq2YfP+emD7h7xpwGWBGbEO /z/g== X-Gm-Message-State: ALoCoQnIKRYxhhxO+6qCIM6EpbtR4Q9crDAt/qVJ4VZOtsKq6m0XFCmzRFS2S8FrMhEsi1o3R1Dc X-Received: by 10.194.188.82 with SMTP id fy18mr856644wjc.132.1414572300056; Wed, 29 Oct 2014 01:45:00 -0700 (PDT) Received: from zulu.local (cpe-46-164-22-46.dynamic.amis.net. [46.164.22.46]) by mx.google.com with ESMTPSA id p3sm4384058wjf.49.2014.10.29.01.44.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 01:44:59 -0700 (PDT) Message-ID: <5450A909.3070400@wandisco.com> Date: Wed, 29 Oct 2014 09:44:57 +0100 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= Organization: WANdisco User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Subversion Development Subject: Re: svn commit: r1634875 - /subversion/trunk/subversion/libsvn_fs_fs/revprops.c References: <20141028131930.B841023888A6@eris.apache.org> In-Reply-To: <20141028131930.B841023888A6@eris.apache.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 28.10.2014 14:19, stefan2@apache.org wrote: > Author: stefan2 > Date: Tue Oct 28 13:19:30 2014 > New Revision: 1634875 > > URL: http://svn.apache.org/r1634875 > Log: > Speed up packed revprop access by tuning the manifest file parser. [...] > +/* Return the minimum length of any packed revprop file name in REVPROPS. */ > +static apr_size_t > +get_min_filename_len(packed_revprops_t *revprops) > +{ > + char number_buffer[SVN_INT64_BUFFER_SIZE]; > + > + /* The revprop filenames have the format . - with being > + * at least the first rev in the shard and having at least one > + * digit. Thus, the minimum is 2 + #decimal places in the start rev. > + */ > + return svn__i64toa(number_buffer, revprops->manifest_start) + 2; > +} Are you absolutely sure this is correct? According to the comment, you should be returning strlen(svn_i64toa(...)) + 2 As it is, you end up allocating buffers that are orders of magnitude larger than necessary. -- Brane