While I was restoring PHS generation in Xash, I tried, in the most stupid way, to parallelize it with OpenMP.
Good news: it's faster by 4.2x~5x times on my 6-core machine in -O3 build. And of course, data matches.
Without it, it takes like 80ms on map with 4k leafs. Considering hard-coded 8k limit in GoldSrc, it isn't much by itself, and probably only worth it for large multiplayer maps with 32k leafs.
Worst news: it still takes a lot of RAM, PVS is a matrix and uncompressed worst case with 32k leafs for HLBSP format would take 128 MB of memory. It might make sense to compress it back and decompress only requested leaves.
Good news: it's faster by 4.2x~5x times on my 6-core machine in -O3 build. And of course, data matches.
Without it, it takes like 80ms on map with 4k leafs. Considering hard-coded 8k limit in GoldSrc, it isn't much by itself, and probably only worth it for large multiplayer maps with 32k leafs.
Worst news: it still takes a lot of RAM, PVS is a matrix and uncompressed worst case with 32k leafs for HLBSP format would take 128 MB of memory. It might make sense to compress it back and decompress only requested leaves.