-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Use ThreadWorkPool instead of thread_process_array in NavMap [3.x] #60366
Use ThreadWorkPool instead of thread_process_array in NavMap [3.x] #60366
Conversation
ecda1de
to
306ca74
Compare
Please add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed on IRC, the engine should be improved in regards to thread pooling (namely, removing threaded_array_processor()
and revising thread pooling so that pools are managed in a more automatic and rational way, depending on platforms. etc.).
We've agreed to let this in anyway, since it's already an improvement given the current state of things, while the deeper discussion comes.
306ca74
to
b3adddd
Compare
I moved the files as asked! Thanks! |
Port ThreadWorkPool to 3.x
b3adddd
to
7749346
Compare
Thanks! |
3.x PR of #60359
Finally, porting PR #60359 to 3.x was easier than anticipated. All because
core/templates/thread_work_pool.{h, cpp}
was easily ported (only required some copy and paste).Note. This PR seems to work, but I do not know if I broke some rules, as
core/templates
didn't already exist.As a benchmark, I used the minimal reproduction project of issue #56838 made by thoced.
NavigationAgentTest.zip
Godot 3.x [master] (using
thread_process_array
), first minute, VSYNC disabled (Windows 10)Godot 3.x [master] (using
ThreadWorkPool
), first minute, VSYNC disabled (Windows 10)As the addition of the new template, this pretty much confirms that a simple cherry-pick of #60359 wouldn't work for 3.x
Along with PR #60359, fixes #56838. But this needs testing.