You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by cu...@apache.org on 2011/10/17 23:03:18 UTC
svn commit: r1185376 - in /avro/trunk: CHANGES.txt lang/php/lib/avro/io.php
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