Skip to content

Improve perfomance of cell evaluation#206

Closed
ledstellar wants to merge 2 commits intoapache:trunkfrom
ledstellar:trunk
Closed

Improve perfomance of cell evaluation#206
ledstellar wants to merge 2 commits intoapache:trunkfrom
ledstellar:trunk

Conversation

@ledstellar
Copy link

The SXSSFRow.getRowNum() method is heavily used from various parts of the code (in particular, from the cell evaluation method). Current implementation of the method is using iterating over sheet rows to find the row number. This approach is ineffective for large sheets. The proposed patch stores the row number directly in the row object to improve method performance.

// use Boolean to have a tri-state for on/off/undefined
private Boolean _hidden = UNDEFINED;
private Boolean _collapsed = UNDEFINED;
private int number;
Copy link
Member

Choose a reason for hiding this comment

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

could you call this rowNumber?

return _sheet;
}

public void setNumber(int rownum) {
Copy link
Member

Choose a reason for hiding this comment

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

does this need to be public - can't it be package-private? -- can it be called setRowNum? To match the name of getRowNum.

@ledstellar
Copy link
Author

Sure. Updated the patch to meet existing code style.

@asfgit asfgit closed this in c0ecc83 Dec 10, 2020
@pjfanning
Copy link
Member

Merged. Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants