you can also unset the arrays, as you write to the end of the files.
The garbage collection should help you.  You might need to directly
interact with the msysql calls so you can release those connections as
well, I'm not sure how long cake holds them, also you might benifit
from not using persisistant connections.  But also by using limit you
should be able to deal with smaller chunks of your data and just get
them in sets that you loop and unset, loop and unset, writing out
filesystem when ever you can and clearing old data.

I wonder if you couldn't leverage temporary tables in the database to
handle some of the data prep on a per worksheet basis...

Sam D

On 10/20/06, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
> On 10/20/06, Gil Vidals <[EMAIL PROTECTED]> wrote:
> >
> > This is a PHP error that can be resolved by changing a setting within
> > php.ini. The setting has to be changed to increase the memory or to
> > "-1", which means infinite memory. Unfortunately, I don't recall the
> > exact setting.
> >
> > memory_limit = -1
> >
>
> /me shudders at the ugly hack
>
> Sure, you can tell PHP "suck up all the memory you can get your hands
> on", but I don't think that is the proper solution to the problem.
> The real solution is trying to find a way to read in those CSV files
> and output it as XML in such a way it doesn't run up against ANY
> memory limits that PHP might have.
>
> Leo, have you thought about something like this:
>
> * open up worksheet
> * open up an XML document on the disk
> * loop through data one line at a time
> * translate the data to XML and append the line to the file on disk
> * stop looping
> * close worksheet
> * close XML document
>
> If you only deal with things one small block at a time, you might have
> some success.
>
> Hope that helps..
>
> --
> Chris Hartjes
>
> "The greatest inefficiencies come from solving problems you will never have."
> -- Rasmus Lerdorf
>
> @TheBallpark - http://www.littlehart.net/attheballpark
> @TheKeyboard - http://www.littlehart.net/atthekeyboard
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to