[GUIDE] Server Optimization⚡

Discussion in 'Performance Tweaking' started by Celebrimbor, Nov 6, 2017.

  1. This is not true. This setting has MAJOR impact on performance as Hoppers or anything getting the chests inventory trigger the cat detection code (it's part of the Double Chest detection code).

    It is not only called on open, but heavily part of the tick.

    Though now that I look at this code, we can prob optimize it to never run cat code for hoppers (the boolean flag on chest.a(world, pos, boolean) seems to relate to cat detection).

    Theres a missing flag check
    Code (Java):

    if (block == this) {
        if (this.e(world, blockposition1)) {
    That we prob just need to add !flag && this.e to

    @Celebrimborir can you also add a link to https://mcflags.emc.gs as we had on frash's post, for recommended JVM startup flags to improve GC behavior/lag spikes/effeciency

    though please don't copy the content of my post here, please just link, so I can make updates to it myself / update target of link If I need to.
    • Like Like x 1
  2. Celebrimbor


    I’m glad that’s being actively updated. I will take some time to fit that in tomorrow.
  3. Nice tutorial m8! Well written and very well explained, also updated to 1.12.2 and Paper options! 10/10
    • Friendly Friendly x 1
  4. electronicboy

    IRC Staff

    *makes some excuse about how it was 2am and I was probably braindead*

    But yea, I think I misread where that getInventory was being called from or thought it wouldn't hit that. The boolean flag is referred to as 'allowBlocking' inside of MCP, looks like it's true in any case where the server cares about "is there a cat or a block on top" for stuff like droppers
    • Optimistic Optimistic x 1
  5. Yeah, sounds like a reasonable var name

    I just need to add the flag check here and then the cat option is "only if you care about the gameplay aspect"
  6. Celebrimbor


    Added the “Pregenerate Map!” Section :)

Share This Page