New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize path finalization in pathfinder #8100

Merged
merged 1 commit into from Jan 12, 2019

Conversation

Projects
None yet
2 participants
@osjc
Copy link
Contributor

osjc commented Jan 12, 2019

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.

Optimize path finalization in pathfinder
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.
@nerzhul

This comment has been minimized.

Copy link
Member

nerzhul commented Jan 12, 2019

okay, sufficiently trivial to be merged to master before release.
@sfan5 okay for you ?

@nerzhul nerzhul added this to the 5.0.0 milestone Jan 12, 2019

@nerzhul nerzhul added the Performance label Jan 12, 2019

@nerzhul

This comment has been minimized.

Copy link
Member

nerzhul commented Jan 12, 2019

@sfan5 agreed on IRC

@nerzhul nerzhul merged commit 5a00b11 into minetest:master Jan 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@osjc osjc deleted the osjc:OptimizePathfinder branch Jan 13, 2019

osjc added a commit to osjc/minetest that referenced this pull request Jan 23, 2019

Optimize path finalization in pathfinder (minetest#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment