Use multiple threads to load objects when loading file
This commit is contained in:
parent
24b2d47a90
commit
415921d881
3 changed files with 6 additions and 4 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue