there's no way that a max heap is better than just sorting

This commit is contained in:
Quaternions 2024-07-27 09:04:51 -07:00
parent a00b6a63c9
commit 5d25400942

View File

@ -266,9 +266,10 @@ impl<R:BinReaderExt> StreamableMap<R>{
read_texture(&mut self.file,block_id)
}
pub fn into_complete_map(mut self)->Result<strafesnet_common::map::CompleteMap,Error>{
//count on reading the file in sequential order being fastest
let mut block_ids=std::collections::BinaryHeap::new();
let mut block_ids=Vec::new();
self.bvh.into_visitor(&mut |block_id|block_ids.push(block_id));
//count on reading the file in sequential order being fastest
block_ids.sort_unstable();
//load all regions
let mut model_pairs=HashMap::new();
for block_id in block_ids{