Skip to content

Use mmap if possible (can save memory with big files) #2121

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

Open
2 tasks done
tgulacsi opened this issue Apr 27, 2025 · 1 comment · May be fixed by #2122
Open
2 tasks done

Use mmap if possible (can save memory with big files) #2121

tgulacsi opened this issue Apr 27, 2025 · 1 comment · May be fixed by #2122
Labels
enhancement New feature or request

Comments

@tgulacsi
Copy link
Contributor

Description

ReadAll is used only in a few places, but most dominantly it is used to slurp up all the .xlsx we are opening.
It may be only a few MiBs, but mmap is an easy solution for this.

Steps to reproduce the issue

  1. open a big .xlsx
  2. Check used memory and GC churn

Describe the results you received

At least the size of .xlsx is used, then later may be released.

Describe the results you expected

Not a lot of memory is used, GC is in peace

Go version

1.24.1

Excelize version or commit ID

2.9.0

Environment

Debian Linux testing

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@xuri xuri added the enhancement New feature or request label Apr 27, 2025
@tgulacsi tgulacsi linked a pull request Apr 27, 2025 that will close this issue
10 tasks
@xuri xuri linked a pull request Apr 27, 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.

2 participants