aboutsummaryrefslogtreecommitdiff
path: root/misc/minetest.svg
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-07-26 22:54:55 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-07-27 07:56:48 +0200
commit61e487719017511fdc37a944ea7321da46d28ee4 (patch)
treef922dbc5428ab19b7966b0d6105432ab43076067 /misc/minetest.svg
parentbc1654feedc90caa8c26328ca6f0fc59fbe5b76c (diff)
downloadminetest-61e487719017511fdc37a944ea7321da46d28ee4.tar.gz
minetest-61e487719017511fdc37a944ea7321da46d28ee4.tar.bz2
minetest-61e487719017511fdc37a944ea7321da46d28ee4.zip
Massive performance improvement on correctBlockNodeIds
correctBlockNodeIds does 2 lookups for each loaded node, one to translate DB ID to name and a second to translate name to real ID. Name to real ID is very consumming if done on every node. As mapblocks are in most cases composed of many identical adjacent nodes, cache previous source and destination id and use them on the next node to prevent any lookup on those maps. This reduce the function load from 15% of my CPU usage to ~0.7%, on the test, calls was reduced from 2.5M lookups to 42k lookups, it's a huge performance gain
Diffstat (limited to 'misc/minetest.svg')
0 files changed, 0 insertions, 0 deletions