xml
XML memory consumption test example one
Submitted by litwol on Tue, 10/11/2011 - 21:29
To run this script on your environment you need PHP installed. I prefer to run this script in terminal (php-cli).
To see *actual* memory usage of this script run the following command in terminal: top -b -d .001 | grep php . Once above command is running, execute the following php script using command: php stats.php (assuming you've saved this file on your own computer with file name "stats.php").
REQUIREMENT:
Processing large or multiple related XML files efficiently in PHP
Submitted by litwol on Tue, 10/11/2011 - 20:33
Click here to scroll to conclussion.
I had to learn the hard way that a 512MB RAM VPS cannot handle 70MB worth of plain text XML files, when i saw a pretty simple importer script consume more than a gig of RAM sending my VPS into swap hell. What did I do wrong and how can I improve things?