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

[BUG] fix Get Rows function memory issues #1875

Merged
merged 3 commits into from
Apr 11, 2024
Merged

Conversation

iraj720
Copy link
Contributor

@iraj720 iraj720 commented Apr 11, 2024

PR Details

fix Get Rows function memory issues that allocate huge amount of memory in special xlsx files

Description

the problem is discussed in the issue
here i just changed it in a way that those empty rows that are located at the end of rows will be ignored

["A", "B", nil, "C", nil, nil] => ["A", "B", nil, "C"]

these nils exist in some special files more than normal
for me was 1 million nils

Related Issue

#1874

Motivation and Context

it was allocating 30Mb of memory for a 10kb file

How Has This Been Tested

discussed in the issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Nima added 2 commits April 11, 2024 11:50
Signed-off-by: Nima <nima@Nimas-MBP.Dlink>
Signed-off-by: Nima <nima@Nimas-MBP.Dlink>
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.21%. Comparing base (5f8a5b8) to head (e098c3a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1875   +/-   ##
=======================================
  Coverage   99.21%   99.21%           
=======================================
  Files          32       32           
  Lines       24067    24069    +2     
=======================================
+ Hits        23878    23880    +2     
  Misses        101      101           
  Partials       88       88           
Flag Coverage Δ
unittests 99.21% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rows.go Outdated Show resolved Hide resolved
@xuri xuri added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 11, 2024
Signed-off-by: Nima <nima@Nimas-MBP.Dlink>
Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution.

@xuri xuri merged commit 3e636ae into qax-os:master Apr 11, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
No open projects
Status: Performance
Development

Successfully merging this pull request may close these issues.

2 participants