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
This commit is contained in:
Mark Baker 2010-10-27 10:39:53 +00:00
parent e3b15694c0
commit bd82adc1f3

View File

@ -140,9 +140,9 @@ class PHPExcel_CachedObjectStorage_CacheBase {
*/ */
public function getSortedCellList() { public function getSortedCellList() {
$sortKeys = array(); $sortKeys = array();
foreach ($this->_cellCache as $coord => $value) { foreach (array_keys($this->_cellCache) as $coord) {
list($colNum,$rowNum) = sscanf($coord,'%[A-Z]%d'); list($column,$row) = sscanf($coord,'%[A-Z]%d');
$sortKeys[sprintf('%09d%3s',$rowNum,$colNum)] = $coord; $sortKeys[sprintf('%09d%3s',$row,$column)] = $coord;
} }
ksort($sortKeys); ksort($sortKeys);