Use multiple threads to load objects when loading file

This commit is contained in:
Yousef Khadadeh 2025-07-21 18:05:41 +03:00
parent 24b2d47a90
commit 415921d881
3 changed files with 6 additions and 4 deletions

View file

@ -458,8 +458,10 @@ void DrawingProgram::initialize_draw_data(cereal::PortableBinaryInputArchive& a)
auto newComp = DrawComponent::allocate_comp_type(t);
a(newComp->coords, *newComp);
components.init_emplace_back(id, newComp);
newComp->final_update(*this);
}
parallel_loop_all_components([&](const auto& c){
c->obj->final_update(*this, false);
});
compCache.force_rebuild();
}