Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slow execution introduced in pull request #4073 #4157

Closed
cristicotet opened this issue Sep 1, 2024 · 1 comment
Closed

slow execution introduced in pull request #4073 #4157

cristicotet opened this issue Sep 1, 2024 · 1 comment

Comments

@cristicotet
Copy link

This is:

- [X] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

fast execution :)

What is the current behavior?

Very slow performance introduced in commit:
Merge pull request #4073 from oleibman/issue1310

The problem is caused by calling the following code in setValueExplicit

$this->getWorksheet()->applyStylesFromArray($cellCoordinate, ['quotePrefix' => $quotePrefix]);

For my particular script (14 sheets), without that line: 2.5-2.6 seconds, with that line: 7.0-7.2 seconds (almost 3x)

What are the steps to reproduce?

Write a bigger XLSX file. Versions before that commit execute way faster.
Commenting the line will reverse performance regression.
Maybe line should not be called on every call to setValueExplicit ?

Which versions of PhpSpreadsheet and PHP are affected?

All since 2.2.0.
Version 2.1.0 is not affecected
PHP 8.3

@oleibman
Copy link
Collaborator

oleibman commented Sep 1, 2024

Help is on the way (PR #4153). Closing as duplicate of #3917.

@oleibman oleibman closed this as completed Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants