Skip to Content Skip to Menu

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

  • pelloq1
  • pelloq1
  • OFFLINE
  • Posts: 5
  • Thanks: 0
  • Karma: 1
13 years 9 months 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:
Code:
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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum