neerja-tekmindz / parsecsv-for-php

Automatically exported from code.google.com/p/parsecsv-for-php
MIT License
0 stars 0 forks source link

Redundant memory usage? #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After $data has been created by the parser, is there any reason that
$file_data should not be unset()?

My only concern is that parser a CSV file consumes anywhere from two to
three times its filesize in memory. With relatively small files parsed
sequentially, memory isn't much of an issue; however, as soon as sizable
CSVs are introduced and/or dealt with concurrently, the script could easily
run into memory limits.

Original issue reported on code.google.com by teh.a...@gmail.com on 30 Jun 2008 at 7:19

GoogleCodeExporter commented 9 years ago
Very true, this was originally something I intended to clean/optimize early on, 
but it seems it slipped through 
the cracks in the floor somewhere along the way.

The next release will by default clear $file_data upon successful parsing, but 
have an option to keep the data for 
debugging purposes.

Original comment by zynode on 30 Jun 2008 at 7:43

GoogleCodeExporter commented 9 years ago
I just addressed this issue as of revision 39 in the subversion trunk. I will 
soon release it as part of v0.4.3 beta, 
along with fixes to as many of the currently active issues I have time with 
tonight :)

Original comment by zynode on 30 Jun 2008 at 8:41