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

Check $strictNullComparison outside of loops #3347

Merged

Conversation

ConnectGrid
Copy link
Contributor

Might be considered a micro-optimization, but for large sheets, it could make a difference in performance. Only check the $strictNullComparison condition once, not for every single cell loop.

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Why this change is needed?

Instantiating Worksheets from an array are currently less than optimal due to checking a boolean condition on every single cell loop.

Might be considered a micro-optimization, but for large sheets, it could make a difference in performance. Only check the `$strictNullComparison` condition once, not for every single cell loop.
@PowerKiKi PowerKiKi force-pushed the optimize-worksheet-from-array branch from f79718f to 3ca3d99 Compare September 13, 2023 14:13
@oleibman
Copy link
Collaborator

Nothing more to discuss.

@oleibman oleibman added this pull request to the merge queue Oct 6, 2024
Merged via the queue into PHPOffice:master with commit 457b61c Oct 6, 2024
12 of 13 checks passed
@oleibman
Copy link
Collaborator

oleibman commented Oct 6, 2024

Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants