Return-Path: X-Original-To: apmail-avro-commits-archive@www.apache.org Delivered-To: apmail-avro-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0673A9333 for ; Mon, 17 Oct 2011 21:03:40 +0000 (UTC) Received: (qmail 85286 invoked by uid 500); 17 Oct 2011 21:03:39 -0000 Delivered-To: apmail-avro-commits-archive@avro.apache.org Received: (qmail 85266 invoked by uid 500); 17 Oct 2011 21:03:39 -0000 Mailing-List: contact commits-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 commits@avro.apache.org Received: (qmail 85259 invoked by uid 99); 17 Oct 2011 21:03:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 21:03:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 21:03:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AE61723888E4 for ; Mon, 17 Oct 2011 21:03:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1185376 - in /avro/trunk: CHANGES.txt lang/php/lib/avro/io.php Date: Mon, 17 Oct 2011 21:03:18 -0000 To: commits@avro.apache.org From: cutting@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111017210318.AE61723888E4@eris.apache.org> Author: cutting Date: Mon Oct 17 21:03:18 2011 New Revision: 1185376 URL: http://svn.apache.org/viewvc?rev=1185376&view=rev Log: AVRO-934. PHP: Remove quadratic performance bug. Contributed by abawany. Modified: avro/trunk/CHANGES.txt avro/trunk/lang/php/lib/avro/io.php Modified: avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1185376&r1=1185375&r2=1185376&view=diff ============================================================================== --- avro/trunk/CHANGES.txt (original) +++ avro/trunk/CHANGES.txt Mon Oct 17 21:03:18 2011 @@ -67,6 +67,8 @@ Avro 1.6.0 (unreleased) AVRO-907. Java: Optimize access to protobuf message fields. (cutting) + AVRO-934. PHP: Remove quadratic performance bug. (abawany via cutting) + IMPROVEMENTS AVRO-836. Python "avro" commandline utility to display and write Avro files. Modified: avro/trunk/lang/php/lib/avro/io.php URL: http://svn.apache.org/viewvc/avro/trunk/lang/php/lib/avro/io.php?rev=1185376&r1=1185375&r2=1185376&view=diff ============================================================================== --- avro/trunk/lang/php/lib/avro/io.php (original) +++ avro/trunk/lang/php/lib/avro/io.php Mon Oct 17 21:03:18 2011 @@ -201,7 +201,9 @@ class AvroStringIO extends AvroIO public function read($len) { $this->check_closed(); - $read = array_slice($this->buffer, $this->current_index, $len); + $read=array(); + for($i=$this->current_index; $i<($this->current_index+$len); $i++) + $read []=$this->buffer[$i]; if (count($read) < $len) $this->current_index = $this->length(); else