Single Runnable or Multiple Runnables?

Discussion in 'Plugin Development' started by Acer_Mortem, Apr 13, 2014.

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

    Acer_Mortem

    Which would result in less lag overall on the server:


    A. Having a single Runnable that for-loops through all of the online players and runs methods A, B, and C every 100 ticks.

    B. Creating a Runnable for each Player that runs methods A, B, C, when that players respective runnable has hit 100 ticks.
     
  2. Offline

    Wehttam664

    Too many runnables (Suggesting BukkitRunnable here) can cause problems because threads are assigned to cores, not memory. One would work the best if its only running every 5 seconds.
     
    Acer_Mortem likes this.
Thread Status:
Not open for further replies.

Share This Page