For what it's worth, we hit exactly the same problem yesterday: ie. realising that Spreadsheet::XLSX just isn't fit for purpose with large files.
On looking at the XLSX.pm code, it became clear it's all a bit of a hack (as noted in various posts above): XML is not parsed properly, inefficient use of regexes, apparent problems with extracting special chars ... even if all that worked OK, it then tries to write the entire spreadsheet in-memory into a Spreadsheet::ParseExcel::Workbook object, which itself would slurp up huge amounts of memory, if it managed to get that far.
To be fair to the author, he does describe the module as "quick and dirty", and I guess that's the down-side of CPAN: production-quality is not guaranteed. Lesson we've learnt: when assessing that module originally, we should've tested it on a large file up front. Doh.
So, first we're going to test 'SimpleXlsx' (which is also on CPAN) to see if that's any better: not yet tried, but it does claim to parse the XML properly. And if that's no good, we're going to have to roll our own.
In reply to Re: Out of Memory
by oxone
in thread Out of Memory
by ETLTCHFIG
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |