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

Very slow SUMIF performance when using "Row Range Notation" #2056

Closed
grahamorrell opened this issue Dec 27, 2024 · 1 comment · Fixed by #2111
Closed

Very slow SUMIF performance when using "Row Range Notation" #2056

grahamorrell opened this issue Dec 27, 2024 · 1 comment · Fixed by #2111
Labels
enhancement New feature or request

Comments

@grahamorrell
Copy link

Description

I have an Excel workbook (minimal example attached) which has some SUMIF( ) formulae that use "Row Range Notation", for example :

=SUMIF(2:2, B11, 4:4)

These perform very poorly in Excelize despite there only being 25 columns in the worksheet. To calculate the sum of 8 of these SUMIF( ) statements takes over 3 seconds.

If I change the SUMIFs to also specify the columns, for example :

=SUMIF(B2:Y2, B11, B4:Y4)

Performance is dramatically improved, taking just 8 milliseconds to calculate the sum of 8 of them.

Steps to reproduce the issue:

  1. Call CalcCellValue on a SUMIF( ) using Row Range Notation

Describe the results you received:

image

Describe the results you expected:

Performance should be almost identical in both cases because the sheet only has 25 columns.

Output of go version:

N/A

Excelize version or commit ID:

excelize-wasm 0.0.7

Windows
SUMIF Performance.xlsx

@xuri xuri added the enhancement New feature or request label Jan 27, 2025
@paolobarbolini
Copy link
Contributor

I'm trying to fix this in #2111. Not all tests pass yet but I'd expect the final implementation to fix your issue without having to manually restrict the range.

@xuri xuri linked a pull request Mar 29, 2025 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants