Skip inner loops for empty/default read filter (#2223)
The optimization from #773 was not copied along in #1033, so restore it Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
This commit is contained in:
parent
e550528c02
commit
5b4b12f77b
|
|
@ -144,6 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
- Column width and Row height styles in the Html Reader when the value includes a unit of measure. [Issue #2145](https://github.com/PHPOffice/PhpSpreadsheet/issues/2145).
|
- Column width and Row height styles in the Html Reader when the value includes a unit of measure. [Issue #2145](https://github.com/PHPOffice/PhpSpreadsheet/issues/2145).
|
||||||
- Data Validation flags not set correctly when reading XLSX files. [Issue #2224](https://github.com/PHPOffice/PhpSpreadsheet/issues/2224) [PR #2225](https://github.com/PHPOffice/PhpSpreadsheet/pull/2225)
|
- Data Validation flags not set correctly when reading XLSX files. [Issue #2224](https://github.com/PHPOffice/PhpSpreadsheet/issues/2224) [PR #2225](https://github.com/PHPOffice/PhpSpreadsheet/pull/2225)
|
||||||
- Reading XLSX files without styles.xml throws an exception. [Issue #2246](https://github.com/PHPOffice/PhpSpreadsheet/issues/2246)
|
- Reading XLSX files without styles.xml throws an exception. [Issue #2246](https://github.com/PHPOffice/PhpSpreadsheet/issues/2246)
|
||||||
|
- Improve XLSX parsing speed if no readFilter is applied (again) - [#772](https://github.com/PHPOffice/PhpSpreadsheet/issues/772)
|
||||||
|
|
||||||
## 1.18.0 - 2021-05-31
|
## 1.18.0 - 2021-05-31
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx;
|
namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx;
|
||||||
|
|
||||||
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
|
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Reader\DefaultReadFilter;
|
||||||
use PhpOffice\PhpSpreadsheet\Reader\IReadFilter;
|
use PhpOffice\PhpSpreadsheet\Reader\IReadFilter;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
use SimpleXMLElement;
|
use SimpleXMLElement;
|
||||||
|
|
@ -91,6 +92,10 @@ class ColumnAndRowAttributes extends BaseParserClass
|
||||||
$rowsAttributes = $this->readRowAttributes($this->worksheetXml->sheetData->row, $readDataOnly);
|
$rowsAttributes = $this->readRowAttributes($this->worksheetXml->sheetData->row, $readDataOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($readFilter !== null && get_class($readFilter) === DefaultReadFilter::class) {
|
||||||
|
$readFilter = null;
|
||||||
|
}
|
||||||
|
|
||||||
// set columns/rows attributes
|
// set columns/rows attributes
|
||||||
$columnsAttributesAreSet = [];
|
$columnsAttributesAreSet = [];
|
||||||
foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) {
|
foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue