Req #15522 [Com]: a proposition to parse LARGE VCARD data
| From: | dco@maeglin.com | Date: | Tue, 29 Sep 2009 14:27:54 +0000 |
| Subject: | Req #15522 [Com]: a proposition to parse LARGE VCARD data | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-1764@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=15522&edit=1
ID: 15522
Comment by: dco@maeglin.com
Reported By: dco at maeglin dot com
Summary: a proposition to parse LARGE VCARD data
Status: Feedback
Type: Feature/Change Request
Package: Contact_Vcard_Parse
Operating System: Linux Debian Etch
Package Version: 1.31.0
PHP Version: 5.2.0
Assigned To: till
Roadmap Versions:
New Comment:
I would like to add something to avoid duplicating the string or file
input into an array... thus saving more space.
I would like to add a method to parse a stream to...
Previous Comments:
------------------------------------------------------------------------
[2009-09-29 15:24:32] dominiquecorfa
Added #patch
bug:15522;patch:Contact_Vcard_Parse_LARGE_FILES;revision:1254234272;.
------------------------------------------------------------------------
[2009-09-04 01:55:57] till
Updates?
------------------------------------------------------------------------
[2009-01-09 04:59:11] dominiquecorfa
Unfortunatly, I didn't wrote a patch right now. I will do it and post
it. No matter if it's not in the next version.
------------------------------------------------------------------------
[2009-01-07 12:02:19] till
That's an interesting proposal, do you want to submit a patch? I
currently am working on a new release to fix up PEAR internals and then
another one to get the code up to the standard.
Let me know!
Till
------------------------------------------------------------------------
[2009-01-06 08:53:12] dominiquecorfa
Description:
------------
The standard PHP allocated memory is about 16Mo. I had to of parse a
VCARD file containing more than 4000 VCARDS (!). The parsing process
goes out of memory. I suggest the following to be able to parse it :
adding a function to parse a file (or a string) but do parse it in a
single table. Instead, call a function (given as a parameter) each time
a VCARD is fully parsed and give the VCARD to this function as a table
(an element of the result of Contact_Vcard_Parse::fromText().
Test script:
---------------
example :
function processVCARD($oneVCARD) {
I do my stuff here;
}
$parse = new Contact_Vcard_Parse();
$parse->OneByOneFromText($someVCARDs, 'processVCARD');
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=15522&edit=1