Memory Usage is too high!

Topics: Developer Forum
Feb 6, 2009 at 12:55 PM
Edited Feb 9, 2009 at 8:24 AM
Hi, lads! Great thanks for your HUGE work!

During work with your classes I've noticed, that peak memory usage is too high. Really!
I'm just reading Excel 5 files - and if file contains only 4 columns and 1000 rows with just 0 as values in cells,
memory usage is about 75 mb.. Too much, isn't it? Is there any way to make it less?

Maybe there are some memory leaks? If there are not, maybe you can add ability to read files in, let's say, "batch" mode: read one object (cell, row, image..), make operations with it's properties/methods, and replace this object with the next?

Memory usage is very important - cause I'm (sugessting, not only..) using side PHP hosting, and most of hosters have
memory_limit = 64 MB
or even less in php.ini.

Once again, great thanks for your work.
Waiting for an answer...

Coordinator
Feb 6, 2009 at 1:23 PM
We have some initiatives going for this, but no final solution yet.
Feb 13, 2009 at 9:08 AM
Same here. I use it to upload Excel files of a few kb, to around 18MB (Excel 2003) or 9-10MB in Excel 2007. However we will have to do files much bigger, like 30-40MB and maybe more. Previously (I inherited this website) the app used the abandoned 'PHP ExcelReader' library, which worked OK-ish but had an odd issue related to UTF-8. So I chopped that out and put in PHPExcel instead. A truly fantastic app - and perfect UTF-8 importing, but very memory hungry. Where before 100MB was fine, I've now had to go to 1024MB to get an upload to work (and that's with files half the size that we will need later). So with the bigger files we may well have to use something else, which is a shame.

A "lite" version maybe, would be nice, to use in reading large files - a fairly common function; uploading large amounts of data into a CMS or database. E.g. we have 80,000 products, and will soon have 300,000. The only sensible way for us is to have the sales dept maintain various Excel files. This enables bulk upload and a pretty painless product maintenance regime. It all hinges on the ability to read/upload Excel files though.

No idea if the architecture would suit a 'lite' version, or whether there would be demand, but this type of bulk updating seems fairly common. Sorry if I went on a bit. Just thinking on the page really. Great app, wish it was lighter on memory is all. Thanks for all the work that's gone into it.
Developer
Feb 14, 2009 at 1:05 AM
We are very eager to get this solved. Preparations have finally started, but there's a lot of work to be done.