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


    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 Administrator Administrator Moderator

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


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


    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



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


    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