Commit Graph
34 Commits
Author SHA1 Message Date
Aikar 627ccd793f Optimize NavigationListener Iteration
I don't know what the person who wrote that code was smoking, but I
don't think it was good.

Gets rid of the WeakHashMap that mojang was abusing purely to be lazy
on clean up, and handles registering and deregistering navigation
upon world add/remove operations.
2016-03-07 22:59:12 -05:00
Aikar 7c3ec88eb6 Optimize NavigationListener Iteration
I don't know what the person who wrote that code was smoking, but I
don't think it was good.
2016-03-07 22:59:12 -05:00
Aikar b65586112b Optimize NavigationListener 2016-03-07 20:45:08 -06:00
Aikar cedb1c3686 Chunk save queue improvements 2016-03-04 20:14:27 -06:00
Aikar fbdb33981e Fix ServerListPingEvent flagging as Async 2016-02-24 00:32:44 -06:00
Aikar 3b4630072e More timings for scheduler 2016-02-23 22:35:34 -06:00
Aikar 5fbb42de01 Make Timings use less passes in its benchmark 2016-02-23 21:31:01 -06:00
Aikar 026367d300 Optimize getBlockData 2016-02-13 19:29:59 -06:00
Aikar 720abf5ab8 Optimize Pathfinding 2016-02-13 19:25:23 -06:00
Aikar eda6aa433f Automatically disable plugins that fail to load 2016-02-13 17:28:15 -06:00
Aikar 6584a8a1b1 Remove completely invalid Redstone event for Netherrack 2016-01-29 03:40:00 -06:00
Aikar 0875e3ee25 Entity teleport fix 2016-01-04 00:23:17 -06:00
Aikar 10316338d8 EAR: Fix bug with teleporting entities 2015-12-22 18:22:36 -06:00
Aikar c0fa6b8d12 Don't create a chunk just to unload it 2015-11-15 19:46:34 -06:00
Aikar 68c983d7cd Don't create region files when checking if a chunk exists 2015-11-15 19:44:28 -06:00
Aikar 929a5b40ed Bump thread count for chunk loading 2015-11-15 19:41:12 -06:00
Aikar 314c8f06cc Don't damage ArmorStands that are already dead 2015-11-15 19:40:32 -06:00
Aikar ee9886c278 Update tick limiter removal and TE/E removal optimizations 2015-10-24 02:12:33 -05:00
Aikar eac397cbab Implement EMC's optimized entity and tileentity removal 2015-10-16 22:23:05 -05:00
Aikar 2d37e27b37 Remove an unused list of TileEntities slowing down removal 2015-10-06 23:27:01 -05:00
Aikar 7e89c54e7c Don't sleep between chunk saves
For some unknown reason, Minecraft is sleeping 10ms between every single chunk being saved to disk.
Under high chunk load/unload activity (lots of movement / teleporting), this causes the chunk unload queue
to build up in size.

This has multiple impacts:
1) Performance of the unload queue itself - The save thread is pretty ineffecient for how it accesses it
   By letting the queue get larger, checking and popping work off the queue can get less performant.
2) Performance of chunk loading - As with #1, chunk loads also have to check this queue when loading
   chunk data so that it doesn't load stale data if new data is pending write to disk.
3) Memory Usage - The entire chunk has been serialized to NBT, and now sits in this queue. This leads to
   elevated memory usage, and then the objects used in the serialization sit around longer than needed,
   resulting in promotion to Old Generation instead of dying young.

If there is work to do, then the thread should be doing its work, and only sleep when it is done.
2015-09-09 21:16:42 -04:00
Aikar bbc7b0999f Optimize Chunk Saving Memory Allocation and Compression
Minecraft ineffeciently uses OutputStreams by calling .write(int) on the stream.
For Chunks, this is a DeflaterOutputStream, which allocates a single byte EVERY write.

This is causing the server to allocate tons of new byte[1] objects.
Additionally, this is very ineffecient for the Deflate process.

By Buffering Writes the same way it already is Buffering Reads, we will
write to the stream much more effeciently.

Also a more effecient RegionFile zero'ing for new chunks to speed up
new chunk generation.
2015-09-09 20:48:46 -04:00
Aikar 2b62b33603 Don't allow sendPacket once disconnect has been processed. 2015-07-23 16:23:21 +10:00
Aikar 5e5d11f13b Prevent tile entity and entity based crashes 2014-12-22 15:13:29 -06:00
Aikar 73bc2489c0 Do not allow negative count itemstacks (infinite itemstacks)
Should work around quite a few issues and this
'feature' is relatively worthless anyway
2014-12-19 16:35:01 -06:00
Aikar 9cb520d8f1 Add TNT source location API 2014-11-30 22:58:25 -06:00
Aikar 3a304401b4 Add Async Chunk Load API 2014-11-06 18:31:52 -06:00
Aikar d1cbf1b137 Implement performance improvements from the EMC-CraftBukkit fork
See the individual patch files for more details
2014-10-19 17:58:49 -05:00
Aikar a4e202676e Implement optimized Tile Entity ticking 2014-08-24 21:19:36 -05:00
Aikar eefd5936bb Update with latest TileEntity optimization changes 2014-08-11 21:43:04 -05:00
Aikar f2cea9d8fa Optimize TileEntity Ticking
Re-organizes the servers TileEntity Tick List to be bucketed by type.

This allows the server to skip buckets of Tile Entities that is known to
not have any tick function (half of them), skipping time spent iterating
them and checking if they are valid and in a loaded chunk. In other words,
a lot of "meta" time wasted on tile entities that would never do anything anyways.

This change also adds control into the interval of every TileEntity, giving
the server owner control on how fast a TileEntity ticks, slowing it down if they must
(Such as chest), to improve performance.
2014-08-11 16:04:54 -05:00
Aikar 5cb541b122 Revert Bukkit damage API changes 2014-07-08 19:31:32 -05:00
Aikar f50d1233d4 Fix damage bug - Fixes BUKKIT-5678 2014-07-07 23:14:51 -05:00
Aikar 5537db04fc Teleport passenger/vehicle with player 2014-06-22 15:28:51 -05:00