RE: [PHP] huge memory usage in PHP 4.0.2 object programming?

From: Date: Sun, 17 Sep 2000 05:59:05 +0000
Subject: RE: [PHP] huge memory usage in PHP 4.0.2 object programming?
Groups: php.general 
Request: Send a blank email to php-general+get-17061@lists.php.net to get a copy of this message
Hi Rasmus, Thanks for your advise, I'll think about changing the logic to process on-demand instead of store a huge data set in memory. By the way, if the object has problem to be a data store, will it get fixed if I use an array to replace it? Or I should in general prevent working with large dataset in PHP apache module programming because this is the way it works in the apache enviornment? I found that our apache web servers with PHP powered, their RSS (usually 6-8M after weeks run) never drop back to the starting point (~2-3M). Thanks for your help! Vincent -----Original Message----- From: Rasmus Lerdorf [mailto:rasmus@php.net] Sent: Sunday, September 17, 2000 1:37 PM To: Vincent W.S. Tam Cc: 'Mark Charette'; php-general@lists.php.net Subject: RE: [PHP] huge memory usage in PHP 4.0.2 object programming? > 2) the result of "free", note the 24M swap usage > > total used free shared buffers cached > Mem: 127760 126640 1120 20444 384 6312 > -/+ buffers/cache: 119944 7816 > Swap: 130748 24948 105800 > > I hope there is some other ways to fix it!? (Don't write object in PHP?) No, objects work fine, but don't use objects as a datastore. Rethink your logic and manipulate your large datasets in the database. Creating thousands of objects in memory doesn't make much sense to me. -Rasmus

« previous php.general (#17061) next »