What's the most common cause of a lag in a plugin?

Discussion in 'Bukkit Discussion' started by jetp250, Apr 6, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    jetp250

    I really hope this is the right section..
    So, I don't have a bug / thing to solve, but is there ticks and/or things that you know that WILL cause lagg on plugins?
    Having too many lists, or scheduler tasks?
    Just so I know what to do and what to not do :D
     
  2. Offline

    timtower Moderator Moderator

    @jetp250 Bad programming is the biggest issue.
    Sometimes ypu need to use timers etc but how you use them is important.
     
  3. Offline

    Lolmewn Retired Staff

    Thread.sleep on the main thread
    Doing SQL on the main thread
    Doing any heavy work on the main thread
     
  4. Offline

    mcdorli

    generating huge structures in the main thread, editing huge chunks of the world in the main thread, calculating the meaning of life in the main thread, etc.
     
    WolfMage1 likes this.
  5. Offline

    teej107

    [​IMG]

    But seriously, @timtower is right. There is asynchronous threading but Bukkit does not support that.
     
  6. Offline

    jetp250

    Okay thanks :D I'm not even using SQL or controlling chunks so I guess bad programming is my biggest issue for now ;p
     
Thread Status:
Not open for further replies.

Share This Page