PhpSpreadsheet icon indicating copy to clipboard operation
PhpSpreadsheet copied to clipboard

Decrease memory consumption for 1.18.0

Open gilberg-vrn opened this issue 3 years ago • 3 comments

This is:

  • [x] improvement

Checklist:

  • [x] Code style is respected
  • [x] Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)

Why this change is needed?

On write large tables (500k rows x 20+ cols) PhpSpreadsheet fails on extra memory allocation (checked on max_memory = 4G) With that PR we got:

  • stringTable now use temporary file
  • stringTable store inverted index in cache
  • cells index rewrite for use 4-bytes blocks and Generator instead in-memory
  • rewrite getHighest* methods in Cells
  • XMLWriter now return resource instead file content when used STORAGE_DISK

gilberg-vrn avatar Jul 19 '21 17:07 gilberg-vrn

Can fix #2107

gilberg-vrn avatar Jul 19 '21 17:07 gilberg-vrn

Any progress on this PR?

vassil-velichkov avatar Aug 19 '21 09:08 vassil-velichkov

@gilberg-vrn I opened #2529 with your changes from Cells. Put you as author of the commit. Please let me know if I should close it or whatever 🙂

eigan avatar Jan 26 '22 07:01 eigan