]> git.lizzy.rs Git - minetest.git/commit
Optimize path finalization in pathfinder (#8100)
authorJozef Behran <jozuejozef@gmail.com>
Sat, 12 Jan 2019 15:57:26 +0000 (10:57 -0500)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Sat, 12 Jan 2019 15:57:26 +0000 (16:57 +0100)
commit5a00b118959941722de977f2452f1e656c75304e
tree0a4a9d50514cd4f849cc60cbbf455732bc4a8f22
parent03cc93f48957a5dee04c56ff8c5b05d647e77d2d
Optimize path finalization in pathfinder (#8100)

The pathfinder needs quite a bunch of items to add to the
resulting list. It turns out the amount of the space needed
for the finalized path is known in advance so preallocate it
to avoid a burst of reallocation calls each time something
needs to look for a path.
src/pathfinder.cpp