Revision 7c9cdcce
Added by danij over 10 years ago
Files
- added
- modified
- copied
- renamed
- deleted
- doomsday
- client
- client.pro (diff)
- include
- world
- bsp
- bsptreenode.h
- linesegment.h (diff)
- partitioncost.h
- partitioncostevaluator.h
- partitionevaluator.h
- superblockmap.h (diff)
- bsp
- world
- src
- world
- bsp
- hplane.cpp (diff)
- linesegment.cpp (diff)
- partitioncostevaluator.cpp
- partitioner.cpp (diff)
- partitionevaluator.cpp
- superblockmap.cpp (diff)
- bsp
- world
- libcore
- server
- client
Optimize|World|bsp::Partitioner: Use a TaskPool for concurrent BSP costing
bsp::PartitionEvaluator now uses a background TaskPool for concurrent
evaluation and costing of candidate partition lines.
The final task model chosen was that which performed the best in my
benchmarks; prepare the candidate work set, wait for all tasks to
complete and then select the partition with the least cost from the
work set. A more complex model involving the canceling of tasks when
a new best choice was found actually turned out to be significantly
worse due to the overhead involved in locking, etc...
This yielded a healthy ~55% performance improvement in the amount of
time taken to build the BSP. Naturally, it is large/complex maps that
will benefit the most.