From 5d254009421e2e2453b5ea9ed65c8d46e36d7318 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 27 Jul 2024 09:04:51 -0700 Subject: [PATCH] there's no way that a max heap is better than just sorting --- src/map.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/map.rs b/src/map.rs index 0a83468..55313f9 100644 --- a/src/map.rs +++ b/src/map.rs @@ -266,9 +266,10 @@ impl StreamableMap{ read_texture(&mut self.file,block_id) } pub fn into_complete_map(mut self)->Result{ - //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{