• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Optimizing Looping All Streamer Objects
#2
Every time a house is removed, its looping thru every object in your server just to check if its furniture or not. That causes the lag because pawn is unthreaded, meaning the server waits for the loop to get finished to continue its operation. So imagine waiting for a loop to go thru 16,000 objects.

Use y_iterate. If you dont know how to theres a documentation somewhere. If you dont want to use iterate, use arrays. Everytime a house adds a furniture, assign the objectid of that furniture to that array.
Away
  Reply


Messages In This Thread
RE: Optimizing Looping All Streamer Objects - by justinnn - 2020-10-01, 10:19 AM

Forum Jump: