Optimize finding lightning rods #4665
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#4665
Loading…
Reference in New Issue
No description provided.
Delete Branch "optimize-lightning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Superceds #4230
Optimize lightning strike handling with respect to lightning rods. Previously mcl_lightning_rods was using a minetest.find_nodes_near() call with a 256x256x256 block search area, which caused significant server lag for the lookup.
This branch replaces that call with an index check of lightning attractors in 64x64x64 block cubes, which is much quicker and doesn't have to inspect nodes that aren't attractors.
This also adds a log warning for server lag greater than 110 ms into the global step handler in mcl_player.
Related issues
MineClone2/MineClone2#4228
Testing
Seems to work as intended? I don't see anything out of the ordinary when running it at least. The entry appears in the mod_storage.sqlite as well, so yeah 👍
b64f7c81b2
to2c3659b355