×

Error

Please login first

dev problem -> CBuser::getInstance >> memory crash

13 years 1 month ago #159322 by pelloq1
Hello,

This is a developer question, hope is the right topic.

I have about 5000 members, I have a mysql query that filter users from some parameters.

Then I a pass trought each user in a loop and load the user. Sample:
foreach($vIds as $id){
	$cbUser	=&	CBuser::getInstance( $id );
	$userData =& $cbUser->getUserData();
	echo $userData->cb_field ;
}
That work perfect, if my query contains about 500 or 1000 users, but if I have more then the page crash and I get a Memory allocation error and the page stops loading.

It's a way to optimise the memory usage ?

Rick

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.941 seconds

Facebook Twitter LinkedIn