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

improved performance of column width calculation for spreadsheets wit… #1628

Closed
wants to merge 6 commits into from

Conversation

rfool
Copy link

@rfool rfool commented Aug 25, 2020

improved performance of column width calculation for spreadsheets with many merged cells

This is:

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

Checklist:

Why this change is needed?

Creating Spreadsheets with many merged cells was very slow.

This was (to some degree) because of a many (unnecesserily) repeated calls to Coordinate::rangeBoundaries(), Cell::isInRange() and Cell::getMergeRange().

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
@MarkBaker MarkBaker removed the stale label Dec 26, 2020
@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Jun 26, 2021
@MarkBaker MarkBaker removed the stale label Jun 30, 2021
*
* @return bool
*/
public function isMergeRangeValueCell2($mergeRange)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea for perhaps better name: isFirstInMergedRange

*
* @var array
*/
private static $_rangeBoundariesCache = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using underscore in variable name is almost never used in this project.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. We're trying to move away from underscore usage. So new usage should not be added again.

*
* @return bool
*/
public function isMergeRangeValueCell2($mergeRange)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All new methods must declare their typing

*
* @var array
*/
private static $_rangeBoundariesCache = [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. We're trying to move away from underscore usage. So new usage should not be added again.

@oleibman
Copy link
Collaborator

No update in over 2.5 years. Closing.

@oleibman oleibman closed this May 16, 2024
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.

None yet

5 participants