On Wednesday 06 October 2004 13:47, ac sandeep wrote:
> I am having trouble parsing a large file as it is in excess of 12Mb. If i
> use a small file like 500Kb then it works fine but if i use a large file
> the script dies saying memory limit exceeded.
>
> I have also tried to increase this limit to 32Mb but the result is the
> same.
>
> Any ideas how i can go about doing this.
redesign your system? ;-)
I've not tried using phpxpath with such a large file but because it reads the
whole document in every time not only will it require lots of memory it's
likely to be very slow too. And because php is stateless it has to do it for
each request. Depending on the number of users your memory usage and response
times could be enormous. It all sounds hugely inefficient to me.
I would be thinking in terms of splitting the data up, perhaps storing it in
an rdbms and using phpxpath as a front end.
|