From bd82adc1f36634d195acc183862f79a86b4e1445 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Wed, 27 Oct 2010 10:39:53 +0000 Subject: [PATCH] Minor performance tweak... simple improvement to sorting the cell cache array git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@62861 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/CachedObjectStorage/CacheBase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php index 7372db28..5a47981d 100644 --- a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php +++ b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php @@ -140,9 +140,9 @@ class PHPExcel_CachedObjectStorage_CacheBase { */ public function getSortedCellList() { $sortKeys = array(); - foreach ($this->_cellCache as $coord => $value) { - list($colNum,$rowNum) = sscanf($coord,'%[A-Z]%d'); - $sortKeys[sprintf('%09d%3s',$rowNum,$colNum)] = $coord; + foreach (array_keys($this->_cellCache) as $coord) { + list($column,$row) = sscanf($coord,'%[A-Z]%d'); + $sortKeys[sprintf('%09d%3s',$row,$column)] = $coord; } ksort($sortKeys);