It’s been three days I’m working here to fix this.
When I use my functions like this, it takes php to respond in 5+ minutes!
$indexContent = $class->myWall($_SESSION['FUID'], 20, 'no', 15, 'no');
$fUser = $class->getUser($_SESSION['FUID']);
but if I use like this, everythings normal takes 250ms to load.
$indexContent = $class->myWall(1, 20, 'no', 15, 'no');
$fUser = $class->getUser(1);
What’s going wrong here? Where is the problem? I tried to upgrade/downgrade php version, mysql version etc but no effect.
What you need is more information.
You should run a profiling tool like xdebug to see exactly where your bottleneck exists. You can analyze the profiling output with a tool like KCachegrind or Cachegrind.