there's no way that a max heap is better than just sorting
This commit is contained in:
parent
a00b6a63c9
commit
5d25400942
@ -266,9 +266,10 @@ impl<R:BinReaderExt> StreamableMap<R>{
|
|||||||
read_texture(&mut self.file,block_id)
|
read_texture(&mut self.file,block_id)
|
||||||
}
|
}
|
||||||
pub fn into_complete_map(mut self)->Result<strafesnet_common::map::CompleteMap,Error>{
|
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=Vec::new();
|
||||||
let mut block_ids=std::collections::BinaryHeap::new();
|
|
||||||
self.bvh.into_visitor(&mut |block_id|block_ids.push(block_id));
|
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
|
//load all regions
|
||||||
let mut model_pairs=HashMap::new();
|
let mut model_pairs=HashMap::new();
|
||||||
for block_id in block_ids{
|
for block_id in block_ids{
|
||||||
|
Loading…
Reference in New Issue
Block a user