1
0
Fork 0
cuberite-2a/src
peterbell10 31a11a6df4
Optimise chunk set (#4260)
Closes #1244

Initially I was just going to add the cChunkData to cSetChunkData but profiling revealed 
that the copying wasn't even the biggest slowdown. Much more time was being spent in 
cChunk::CreateBlockEntities and cChunk::WakeUpSimulators than was in memcpy so I've made 
those significantly faster as well.

Optimisations performed:
 * cSetChunkData now stores blocks in a cChunkData object
 * cChunkData objects can now perform moves even if they are using different pools
 * cChunk::CreateBlockEntities now iterates in the correct order and only over present chunk sections
 * Similarly for cChunk::WakeUpSimulators
 * cSetChunkData::CalculateHeightMap now shortcuts to the highest present chunk section before checking blocks directly
2018-07-23 19:12:51 +01:00
..
Bindings cBlockArea: Write all present data types by default (#4252) 2018-07-19 22:36:46 +01:00
BlockEntities Prefer static_cast to reinterpret_cast (#4223) 2018-05-02 08:50:36 +01:00
Blocks fix dispenser pickup display bug (#4247) 2018-06-30 22:37:10 +01:00
Entities cPawn: Reset last ground height in ResetPosition (#4261) 2018-07-23 17:26:48 +01:00
Generating cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258) 2018-07-22 22:35:58 +01:00
HTTP Prefer static_cast to reinterpret_cast (#4223) 2018-05-02 08:50:36 +01:00
Items Keep players in gmNotSet (#4248) 2018-07-23 00:35:32 +01:00
Mobs Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
Noise Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
OSSupport cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258) 2018-07-22 22:35:58 +01:00
Protocol Keep players in gmNotSet (#4248) 2018-07-23 00:35:32 +01:00
Resources New icon colors (#3675) 2017-06-03 18:49:02 +02:00
Simulator Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
UI Prefer static_cast to reinterpret_cast (#4223) 2018-05-02 08:50:36 +01:00
WorldStorage cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258) 2018-07-22 22:35:58 +01:00
mbedTLS++ Prefer static_cast to reinterpret_cast (#4223) 2018-05-02 08:50:36 +01:00
AllocationPool.h Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
BiomeDef.cpp Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
BiomeDef.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
BlockArea.cpp fix block area rotation bug (#4243) 2018-06-25 18:31:05 +02:00
BlockArea.h cBlockArea: Write all present data types by default (#4252) 2018-07-19 22:36:46 +01:00
BlockID.cpp Deal with covered switches consistently (#4161) 2018-02-04 23:07:12 +00:00
BlockID.h Minor changes (#3909) 2017-08-24 11:19:40 +02:00
BlockInServerPluginInterface.h Replaced includes with forward declarations 2017-08-13 12:31:10 +01:00
BlockInfo.cpp Update m_IsSolid assignments in BlockInfo (#4167) 2018-06-24 11:32:17 +01:00
BlockInfo.h cBlockInfo: Deprecate direct access to variables. (#4184) 2018-02-20 10:43:28 +00:00
BlockTracer.h Tracer replacement (#3704) 2017-05-11 13:34:36 +01:00
BoundingBox.cpp Fully implemented leashes (#3798) 2017-08-21 10:46:41 +02:00
BoundingBox.h Fully implemented leashes (#3798) 2017-08-21 10:46:41 +02:00
BrewingRecipes.cpp Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
BrewingRecipes.h Minor cBrewingRecipes cleanup (#3731) 2017-05-28 20:08:23 +02:00
Broadcaster.cpp Removed ClientHandle.h dependencies from common headers. 2016-11-18 20:00:04 +01:00
Broadcaster.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
BuildInfo.h.cmake Added abilty to set build info 2014-09-10 16:07:00 +01:00
ByteBuffer.cpp Prefer static_cast to reinterpret_cast (#4223) 2018-05-02 08:50:36 +01:00
ByteBuffer.h Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
CMakeLists.txt cItemGrid: Allocate storage lazily (#4083) 2018-01-21 18:45:13 +00:00
ChatColor.cpp Refactored cChatColor 2014-07-19 11:09:39 -07:00
ChatColor.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
CheckBasicStyle.lua StyleCheck: Add "else has to be on a separate line" (#3412) 2016-10-20 19:09:18 +02:00
Chunk.cpp Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
Chunk.h Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
ChunkData.cpp Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
ChunkData.h cChunk and cChunkData: Use vectors for block get and set functions (#4172) 2018-02-04 22:15:31 +00:00
ChunkDataCallback.h Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
ChunkDef.h Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
ChunkMap.cpp Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
ChunkMap.h BroadcastBlockBreakAnimation and BroadcastBlockEntity use vectors (#4038) 2017-09-25 18:17:45 +02:00
ChunkSender.cpp cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258) 2018-07-22 22:35:58 +01:00
ChunkSender.h cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258) 2018-07-22 22:35:58 +01:00
ChunkStay.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
ChunkStay.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
ClientHandle.cpp Keep players in gmNotSet (#4248) 2018-07-23 00:35:32 +01:00
ClientHandle.h recover hotbar selected slot after reconnect (#4249) 2018-07-22 23:23:33 +01:00
Color.cpp Leather Armor can now be dyed. 2015-07-15 14:05:36 -06:00
Color.h Lua plugin cColor (#3833) 2017-07-12 12:30:43 +02:00
CommandOutput.cpp Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
CommandOutput.h Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
CompositeChat.cpp CompositeChat: Use shorter JSON format. 2016-12-16 00:07:23 +01:00
CompositeChat.h Fixed cCompositeChat's constructor LuaAPI bindings. 2016-09-25 12:42:05 +02:00
CraftingRecipes.cpp Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
CraftingRecipes.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Cuberite.vcxproj.user Added working directory for x64 builds (#4037) 2017-09-20 19:01:46 +01:00
Cuboid.cpp cCuboid: restore default copy construct and assign. 2017-08-28 13:48:10 +01:00
Cuboid.h Add TOLUA_EXPOSITION for readability 2017-08-28 14:36:23 +01:00
DeadlockDetect.cpp Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
DeadlockDetect.h Clang 5.0 fixes 2017-05-21 12:19:06 +02:00
Defines.h Deal with covered switches consistently (#4161) 2018-02-04 23:07:12 +00:00
EffectID.h Update tolua and export EffectID 2017-06-29 18:58:48 +02:00
Enchantments.cpp Added anvil enchantment handling. (#3857) 2017-07-28 18:00:20 +01:00
Enchantments.h Minor changes (#3909) 2017-08-24 11:19:40 +02:00
Endianness.h Fixes compilation failures on MacOSX 10.10 2015-07-09 11:15:37 -06:00
FastRandom.cpp Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
FastRandom.h Tentative fix for player-limit race condition (#3862) 2017-07-28 17:54:40 +01:00
ForEachChunkProvider.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
FunctionRef.h Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
FurnaceRecipe.cpp Smelting Gives Experience (#4094) 2018-04-11 07:46:11 +01:00
FurnaceRecipe.h Smelting Gives Experience (#4094) 2018-04-11 07:46:11 +01:00
Globals.cpp
Globals.h Deal with covered switches consistently (#4161) 2018-02-04 23:07:12 +00:00
IniFile.cpp Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
IniFile.h Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
Inventory.cpp Fix typo in #4095. 2017-12-21 16:01:24 +00:00
Inventory.h Removed unused forward declarations (#3888) 2017-08-03 15:10:29 +02:00
Item.cpp Improved fishing rewards (#4120) 2018-01-05 14:32:30 +00:00
Item.h Item durability loss now depends on the item used. (#4123) 2018-01-05 11:28:06 +00:00
ItemGrid.cpp cItemGrid: Allocate storage lazily (#4083) 2018-01-21 18:45:13 +00:00
ItemGrid.h cItemGrid: Allocate storage lazily (#4083) 2018-01-21 18:45:13 +00:00
LazyArray.h cItemGrid: Allocate storage lazily (#4083) 2018-01-21 18:45:13 +00:00
LightingThread.cpp cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258) 2018-07-22 22:35:58 +01:00
LightingThread.h cWorld Threads: Seperate initialization and thread start. 2017-10-21 19:33:22 +02:00
LineBlockTracer.cpp Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LineBlockTracer.h Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LinearInterpolation.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
LinearInterpolation.h Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
LinearUpscale.h Fixed RasPi builds of unit tests. 2016-08-04 20:47:53 +02:00
Logger.cpp Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
Logger.h Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
LoggerListeners.cpp Flush stdout after resetting console colour. (#4240) 2018-06-20 09:15:57 +02:00
LoggerListeners.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
LoggerSimple.h Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00
Map.cpp Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
Map.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
MapManager.cpp Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
MapManager.h Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
Matrix4.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
MemorySettingsRepository.cpp Initial implementation of IniFile overloading 2015-05-16 10:46:51 +01:00
MemorySettingsRepository.h Fixed RasPi builds of unit tests. 2016-08-04 20:47:53 +02:00
MobCensus.cpp Deal with covered switches consistently (#4161) 2018-02-04 23:07:12 +00:00
MobCensus.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
MobFamilyCollecter.cpp Removed double includes (#3885) 2017-08-02 19:57:20 +01:00
MobFamilyCollecter.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
MobProximityCounter.cpp Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
MobProximityCounter.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
MobSpawner.cpp Removed duplicate code (#4198) 2018-04-11 12:17:30 +01:00
MobSpawner.h Removed duplicate code (#4198) 2018-04-11 12:17:30 +01:00
MonsterConfig.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
MonsterConfig.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
NetherPortalScanner.cpp Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
NetherPortalScanner.h Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
OverridesSettingsRepository.cpp Proper fix for #3136 (#3143) 2016-04-18 23:04:13 +01:00
OverridesSettingsRepository.h Clang 5.0 fixes 2017-05-21 12:19:06 +02:00
ProbabDistrib.cpp Removed double includes (#3885) 2017-08-02 19:57:20 +01:00
ProbabDistrib.h FastRandom rewrite (#3754) 2017-06-13 21:35:30 +02:00
RCONServer.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
RCONServer.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
RankManager.cpp Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
RankManager.h Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
Root.cpp Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
Root.h Broadcast playerlist removal in every world (#4201) 2018-04-02 18:39:54 +01:00
Scoreboard.cpp Deal with covered switches consistently (#4161) 2018-02-04 23:07:12 +00:00
Scoreboard.h Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
Server.cpp Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
Server.h Update mbedtls to 2.5.1 (#3964) 2017-08-30 15:00:06 +01:00
SetChunkData.cpp Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
SetChunkData.h Optimise chunk set (#4260) 2018-07-23 19:12:51 +01:00
SettingsRepositoryInterface.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
SpawnPrepare.cpp Potential spawn prepare fix (#3924) 2017-08-22 14:34:43 +02:00
SpawnPrepare.h Potential spawn prepare fix (#3924) 2017-08-22 14:34:43 +02:00
Statistics.cpp Minor changes (#3909) 2017-08-24 11:19:40 +02:00
Statistics.h Fixed spaces around single-line comments. 2014-07-17 19:13:23 +02:00
Stopwatch.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
StringCompression.cpp Fixed type-casting-related warnings. 2016-08-24 22:26:53 +02:00
StringCompression.h Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
StringUtils.cpp Prefer static_cast to reinterpret_cast (#4223) 2018-05-02 08:50:36 +01:00
StringUtils.h Smelting Gives Experience (#4094) 2018-04-11 07:46:11 +01:00
Tracer.cpp Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
Tracer.h Use clang-tidy to check more code conventions (#4214) 2018-05-06 18:07:34 +01:00
UUID.cpp Make offline UUIDs consistent with vanilla. (#4178) 2018-07-20 00:30:09 +01:00
UUID.h Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
Vector3.h Add TOLUA_EXPOSITION for readability 2017-08-28 14:36:23 +01:00
VoronoiMap.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
VoronoiMap.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
WebAdmin.cpp Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
WebAdmin.h Removed unused forward declarations (#3888) 2017-08-03 15:10:29 +02:00
World.cpp Rewrite explosion knock back (#4251) 2018-07-23 10:24:00 +01:00
World.h Keep players in gmNotSet (#4248) 2018-07-23 00:35:32 +01:00
XMLParser.h Minor changes (#3909) 2017-08-24 11:19:40 +02:00
main.cpp Add the fmt library (#4065) 2018-01-03 17:41:16 +00:00