Hi. I have this script working, but it seems quite slow.
Basically, I now have the Amazon XML feed, and I'm "parsing" the data as follows;
Use a while() to go through the main 1Gb+ XML file, and split into smaller .xml files, which are then "cleaned" out to a Tab delimited file (to save space, and theoretically minamise the amount of memory each file takes up in memory when slurping it into memory).
I then use a while() loop to go through each of the smaller files (5,000 records per .db file, which works out about 5-10Mb).
So far, its does about 2-3 items per second, which sounds ok... but on 1,000,000+ products, thats several days for it to complete :(
I've tried cleaning out old variables (to fee up memory), but it still doesn't seem to be going that quick (I was hoping for at least 10 items per second).
Anyone got any suggestions on speeding it up, or do you think thats about the best I'm gonna be able to get? I *really* want to speed it up if possible (as long as it doesn't include a full rewrite
).
TIA.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Basically, I now have the Amazon XML feed, and I'm "parsing" the data as follows;
Use a while() to go through the main 1Gb+ XML file, and split into smaller .xml files, which are then "cleaned" out to a Tab delimited file (to save space, and theoretically minamise the amount of memory each file takes up in memory when slurping it into memory).
I then use a while() loop to go through each of the smaller files (5,000 records per .db file, which works out about 5-10Mb).
So far, its does about 2-3 items per second, which sounds ok... but on 1,000,000+ products, thats several days for it to complete :(
I've tried cleaning out old variables (to fee up memory), but it still doesn't seem to be going that quick (I was hoping for at least 10 items per second).
Anyone got any suggestions on speeding it up, or do you think thats about the best I'm gonna be able to get? I *really* want to speed it up if possible (as long as it doesn't include a full rewrite

TIA.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!