Question about Lag

Discussion in 'Plugin Development' started by Eggspurt, Jun 4, 2015.

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

    Eggspurt

    Does using Bukkit Events effect the server performance wise? Like if I use

    BlockBreakEvent on several plugins, will that cause lag if I have many players breaking blocks and what not. Or if I use PlayerInteractEvent I feel like it would cause lag after a while but I am not certain, which is why I ask the bukkit community, just curious on how it works. Thanks
     
  2. Offline

    Konato_K

    @Eggspurt It will only cause lag if you run intensive code in the event handler, otherwise you'll be fine.
     
  3. Offline

    Eggspurt

    Intensive code meaning?

    What if I log if they mine a specific block via yml?
     
  4. Offline

    Konato_K

    @Eggspurt If you just save it, then it shouldn't be resource consuming, unless you also save the config.

    However, if you want logging better use a simple text file apart instead of a Configuration object.
     
  5. Offline

    Eggspurt

    Er well I need individual text files if I did it that way and I feel like that would be laggy after enough people?
     
  6. Offline

    Konato_K

    @Eggspurt Writing on disk is fairly fast, if I were I would first try to do it, then check if it causes any TPS drops.
     
  7. Offline

    Zombie_Striker

    @Eggspurt
    Every method that is running will create lag. You need to know what will take up the least amount of memory if you want you code to be efficient and to not create lag.
     
Thread Status:
Not open for further replies.

Share This Page