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

Issue 629 - Use gt operator instead of max for highest row #824

Closed
wants to merge 1 commit into from
Closed

Issue 629 - Use gt operator instead of max for highest row #824

wants to merge 1 commit into from

Conversation

matt-allan
Copy link

@matt-allan matt-allan commented Dec 18, 2018

Using an operator is significantly faster than calling the max function.
As this method is called more than once per cell the difference adds up.

This is:

- [x] a bugfix
- [ ] a new feature

Checklist:

Why this change is needed?

When reading a large spreadsheet the Worksheet::createNewCell method is called more times than the number of cells in the spreadsheet. When reading a ~100k cell spreadsheet I saw a 25% reduction in run time by replacing the call to max with a > comparison.

Using an operator is significantly faster than calling the max function.
As this method is called more than once per cell the difference adds up.
@PowerKiKi PowerKiKi closed this in 0f8292f Jan 2, 2019
guillaume-ro-fr pushed a commit to guillaume-ro-fr/PhpSpreadsheet that referenced this pull request Jun 12, 2019
Using an operator is significantly faster than calling the max function.
As this method is called more than once per cell the difference adds up.

Closes PHPOffice#824
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.

1 participant