1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Solved Increased CPU usage for Hoppers in 1.5.2 (#836)

Discussion in 'Bugs & Feature Requests' started by octagami, May 3, 2013.

  1. octagami


    I updated to Spigot #836 earlier today. I haven't had an issues with stability whatsoever, but I did notice a large performance hit.

    After taking some timings, it appears the issue is tickTileEntity, specifically for Hoppers.

    The following timings are roughly comparable as far as duration, # of players, and # of entities. I can't rule out that more hoppers were in use in the more recent timings, but I don't think that it was the case.

    Version git-Spigot-789 (MC: 1.5.1):


    12.66% 0.00% 71.337 s 0.0002 ms 298,706.52k 1.54% ** tickTileEntity
    7.94% 0.01% 44.738 s 0.0037 ms 12,118.68k 0.56% ** tickTileEntity - TileEntityHopper

    Version git-Spigot-836 (MC: 1.5.2):

    33.53% 0.00% 218.701 s 0.0007 ms 311,018.40k 4.89% ** tickTileEntity
    29.05% 0.05% 189.520 s 0.0238 ms 7,955.94k 3.14% ** tickTileEntity - TileEntityHopper

    Looking through recent CraftBukkit commits I noticed this:

    "Revert "Add delay to hopper even if it doesn't do anything."

    Does anyone know why that commit was reverted? Could it explain the increase in CPU usage by hoppers?

    Is there any chance of a Spigot feature that allows us to configure how often Hoppers tick?
  2. md_5

    Administrator Developer

    Yes that explains it
  3. octagami


    Out of curiosity, are you considering re-adding the reverted commit? Or is there a better solution in the works for tile entities?
  4. dwi


    Is there any workaround, how to fix this Hopper issues? It really kills my TPS once some bigger factory/storage gets loaded with plenty of hoppers :(