homepage Welcome to WebmasterWorld Guest from 54.196.62.132
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Server friendly array iteration...
ncreegan




msg:1250456
 3:49 am on Jun 25, 2004 (gmt 0)

I'm having some trouble keeping my server alive when iterating through huge arrays to put data in a database. Is there anything less cpu intensive than a simple count and for loop?

 

jatar_k




msg:1250457
 3:45 pm on Jun 25, 2004 (gmt 0)

what size arrays are we talkin?
what are you doing that makes the monster arrays necessary?
is there a way to split the work so that you can dump the data into the db earlier instead of making the whole array?

m_shroom




msg:1250458
 4:20 pm on Jun 25, 2004 (gmt 0)

The problem is more likely a lack of ram and needing to use swap file that is killing you.

Also use ( unset($var); ) get rid of unneeded vars and free ram.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved