Skip to content
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

Eliminate last get_vehicle call when vehicles are idle. #31903

Merged
merged 1 commit into from Jun 27, 2019

Conversation

Projects
None yet
2 participants
@kevingranade
Copy link
Member

commented Jun 27, 2019

Summary

SUMMARY: None

Purpose of change

More profiling. There was one remaining call to get_vehicles() per turn in vehmove, even if no vehicles were even present.

Describe the solution

Replace the initial call to get_vehicles() in vehmove() with manually accessing the vehicle cache.
Subsequent retrievals of vehicles must still use get_Vehicles(), but the first one can use the cache.

@ZhilkinSerg ZhilkinSerg merged commit 91022b0 into CleverRaven:master Jun 27, 2019

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
gorgon-ghprb Build triggered for merge commit.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2019

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/vehicles-cant-accelerate/20574/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.