mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2025-03-27 18:33:56 +03:00
Minor performance tweak to PHPTemp and DiscISAM caching
This commit is contained in:
parent
bdb8b50156
commit
125f39c745
@ -69,10 +69,10 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
|
|||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
|
|
||||||
fseek($this->_fileHandle,0,SEEK_END);
|
fseek($this->_fileHandle,0,SEEK_END);
|
||||||
$offset = ftell($this->_fileHandle);
|
|
||||||
fwrite($this->_fileHandle, serialize($this->_currentObject));
|
$this->_cellCache[$this->_currentObjectID] = array(
|
||||||
$this->_cellCache[$this->_currentObjectID] = array('ptr' => $offset,
|
'ptr' => ftell($this->_fileHandle),
|
||||||
'sz' => ftell($this->_fileHandle) - $offset
|
'sz' => fwrite($this->_fileHandle, serialize($this->_currentObject))
|
||||||
);
|
);
|
||||||
$this->_currentCellIsDirty = false;
|
$this->_currentCellIsDirty = false;
|
||||||
}
|
}
|
||||||
|
@ -61,10 +61,10 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
|||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
|
|
||||||
fseek($this->_fileHandle,0,SEEK_END);
|
fseek($this->_fileHandle,0,SEEK_END);
|
||||||
$offset = ftell($this->_fileHandle);
|
|
||||||
fwrite($this->_fileHandle, serialize($this->_currentObject));
|
$this->_cellCache[$this->_currentObjectID] = array(
|
||||||
$this->_cellCache[$this->_currentObjectID] = array('ptr' => $offset,
|
'ptr' => ftell($this->_fileHandle),
|
||||||
'sz' => ftell($this->_fileHandle) - $offset
|
'sz' => fwrite($this->_fileHandle, serialize($this->_currentObject))
|
||||||
);
|
);
|
||||||
$this->_currentCellIsDirty = false;
|
$this->_currentCellIsDirty = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user