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();
|
||||
|
||||
fseek($this->_fileHandle,0,SEEK_END);
|
||||
$offset = ftell($this->_fileHandle);
|
||||
fwrite($this->_fileHandle, serialize($this->_currentObject));
|
||||
$this->_cellCache[$this->_currentObjectID] = array('ptr' => $offset,
|
||||
'sz' => ftell($this->_fileHandle) - $offset
|
||||
|
||||
$this->_cellCache[$this->_currentObjectID] = array(
|
||||
'ptr' => ftell($this->_fileHandle),
|
||||
'sz' => fwrite($this->_fileHandle, serialize($this->_currentObject))
|
||||
);
|
||||
$this->_currentCellIsDirty = false;
|
||||
}
|
||||
|
|
|
@ -61,10 +61,10 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
|||
$this->_currentObject->detach();
|
||||
|
||||
fseek($this->_fileHandle,0,SEEK_END);
|
||||
$offset = ftell($this->_fileHandle);
|
||||
fwrite($this->_fileHandle, serialize($this->_currentObject));
|
||||
$this->_cellCache[$this->_currentObjectID] = array('ptr' => $offset,
|
||||
'sz' => ftell($this->_fileHandle) - $offset
|
||||
|
||||
$this->_cellCache[$this->_currentObjectID] = array(
|
||||
'ptr' => ftell($this->_fileHandle),
|
||||
'sz' => fwrite($this->_fileHandle, serialize($this->_currentObject))
|
||||
);
|
||||
$this->_currentCellIsDirty = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue