summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/ChunkProviderServer.java
Commit message (Collapse)AuthorAgeLines
* Replace LongObjectHashMap with a more efficient implementationTravis Watkins2012-09-21-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | After further testing it appears that while the original LongHashtable has issues with object creation churn and is severly slower than even java.util.HashMap in general case benchmarks it is in fact very efficient for our use case. With this in mind I wrote a replacement LongObjectHashMap modeled after LongHashtable. Unlike the original implementation this one does not use Entry objects for storage so does not have the same object creation churn. It also uses a 2D array instead of a 3D one and does not use a cache as benchmarking shows this is more efficient. The "bucket size" was chosen based on benchmarking performance of the HashMap with contents that would be plausible for a 200+ player server. This means it uses a little extra memory for smaller servers but almost always uses less than the normal java.util.HashMap. To make up for the original LongHashtable being a poor choice for generic datasets I added a mixer to the new implementation based on code from MurmurHash. While this has no noticable effect positive or negative with our normal use of chunk coordinates it makes the HashMap perform just as well with nearly any kind of dataset. After these changes ChunkProviderServer.isChunkLoaded() goes from using 20% CPU time while sampling to not even showing up after 45 minutes of sampling due to the CPU usage being too low to be noticed.
* [Bleeding] Remove redundant chunkList from ChunkProviderServerMike Primm2012-08-19-5/+2
| | | | | | This ArrayList duplicates part of the functionality of the much more efficient chunk map so can be removed as the map can be used in the few places this was needed.
* Add LongObjectHashMap and LongHashSetTravis Watkins2012-08-19-4/+4
| | | | | | | | | | | | | | | Replace uses of LongHashtable and LongHashset with new implementations. Remove EntryBase, LongBaseHashtable, LongHashset, and LongHashtable as they are no longer used. LongObjectHashMap does not use Entry or EntryBase classes internally for storage so has much lower object churn and greater performance. LongHashSet is not as much of performance win for our use case but for general use is up to seventeen times faster than the old implementation and is in fact faster than alternatives from "high performance" java libraries. This is being added so that if someone tries to use it in the future in a place unrelated to its current use they don't accidentally end up with something slower than the Java collections HashSet implementation.
* Fix issues with chunk saving. Fixes BUKKIT-2158, BUKKIT-2018 and BUKKIT-2229Mike Primm2012-08-19-4/+18
|
* Don't force chunks to load again, causes chunk leaks with multiworld.Travis Watkins2012-08-06-1/+1
|
* Don't tick chunks or entities on chunks that are queued for unload.Travis Watkins2012-08-04-2/+2
| | | | | Treat chunks in the unload queue as if they are already unloaded to prevent processing on them removing them from the unload queue and leaking.
* Potentially fix chunk leaking, needs further examinationfeildmaster2012-08-04-1/+1
|
* Update CraftBukkit to Minecraft 1.3.1feildmaster2012-08-02-7/+16
|
* Cleaned up CraftBukkit comments in NMS.Wesley Wolfe2012-07-23-9/+7
| | | | | | | | | | | | | Added newlines at the end of files Fixed improper line endings on some files Matched start - end comments Added some missing comments for diffs Fixed syntax on some spots Minimized some diff Removed some no longer used files Added comment on some required files with no changes Fixed imports of items used once Added imports for items used more than once
* Remove legacy Chunk cache. Fixes BUKKIT-1400feildmaster2012-04-24-2/+0
|
* Updated CraftBukkit to 1.2Nathan Adams2012-03-01-7/+7
|
* Updated to Minecraft 1.1Erik Broes2012-01-12-0/+15
|
* Update to mc-dev rename revision 01Nathan Adams2012-01-12-4/+4
|
* Update for 1.0.0Erik Broes2011-11-20-11/+19
|
* Update to mcdev rename revision 01 for 1.8.1Dinnerbone2011-09-24-2/+2
|
* Invalid position errors for chunks now display what world they're forDinnerbone2011-09-17-2/+2
|
* Bunchafixes which may or may not have any end resultDinnerbone2011-09-16-1/+5
|
* Update for Minecraft 1.8Dinnerbone2011-09-15-21/+5
|
* Implemented per world setting to keep the spawn in memory or not.Rigby2011-08-05-1/+1
|
* Massive renaming update in nms. If you bypassed Bukkit, you will likely break.Erik Broes2011-06-27-16/+13
| | | | Also minimized all the nms diffs and generic cleanups all around.
* Implemented ChunkPopulateEventDinnerbone2011-06-16-1/+6
|
* Fixed random NPEs when generating a worldDinnerbone2011-06-11-2/+6
|
* Generic cleanupErik Broes2011-06-12-4/+4
|
* Implemented custom chunk generators and block populatorsDinnerbone2011-06-06-0/+16
|
* Implemented 1.6!Dinnerbone2011-05-26-15/+16
|
* Whitespace + general cleanupErik Broes2011-05-15-5/+5
|
* Update for 1.5_02.Erik Broes2011-04-21-2/+2
|
* Update for 1.4_00_01 -- if you bypassed Bukkit, you will most likely break.Erik Broes2011-04-20-84/+82
|
* Updated to Minecraft version 1.4Dinnerbone2011-03-31-16/+24
|
* Updated for the cleanups done in BukkitErik Broes2011-03-26-3/+2
|
* Fixing event namesErik Broes2011-03-21-2/+2
|
* Code cleanup, fixed doors, chunk entity fetchingTahg2011-03-11-2/+2
|
* Regenerate and refresh chunk methodsRaphfrk2011-03-07-2/+2
|
* limit chunk unloading to 50 per ticktahg2011-03-02-1/+1
|
* Synchronized and moved Hash classesFrozenCow2011-03-01-0/+2
|
* Fixed some debugTahg2011-02-24-1/+10
|
* Generic code cleanupErik Broes2011-02-23-9/+9
|
* Update to Minecraft 1.3 betaDinnerbone2011-02-23-7/+8
|
* N.M.S cleanup in preparation for updateDinnerbone2011-02-21-5/+1
|
* Minor cleaning of codeErik Broes2011-02-20-5/+3
|
* Prevent Blocks from getting lost when a chunk reloadsErik Broes2011-02-20-0/+2
|
* fixed buttons, platesTahg2011-02-19-10/+18
| | | | | added yield to explosion added event for chunk unloading
* Removed debug and fixed //craftbukkit comments from 0239b76f611597f8486aDinnerbone2011-02-11-2/+2
|
* more chunk fixesTahg2011-02-11-14/+12
|
* Fixed chunk unloadingDinnerbone2011-02-10-1/+1
|
* Just cleaning some commits. Don't mind me.Dinnerbone2011-02-08-104/+7
|
* Added loadChunk, unloadChunk and unloadChunkRequest.Dinnerbone2011-02-08-1/+89
|
* Fixing missing mandatory comments.Erik Broes2011-02-07-7/+12
|
* Chunk fetching improvementsTahg2011-02-07-18/+11
|
* getLoadedChunks methodRaphfrk2011-02-05-0/+13
|