Jump to content

How heavy are while loops and waits in terms of memory?


leron9999

Recommended Posts

Hi guys. Just wondering how heavy it is to use while loop as compared to single updates? I currently use while loops for repeating steps and utility.wait for just waiting for the script or magic effect to remove itself. Would that be preferable as compared to using single update? I used those since it essentially does the same thing under the assumption that it uses less script memory.

Link to comment
Share on other sites

It depends on how many things you are initiating through. A script can run through a while loop 5 or 10 times incredibly fast but if you are running through it hundreds or thousands of time and doing a lot in the while loop it will lag down the game.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...