Draw speedup when there are >100000 objects in the canvas

This commit is contained in:
Yousef Khadadeh 2025-07-21 15:46:42 +03:00
parent 1c1f23d68d
commit f74298d21d
3 changed files with 70 additions and 12 deletions

View file

@ -36,7 +36,7 @@ void DrawingProgramCache::build(std::vector<CollabListType::ObjectInfoPtr> compo
}
void DrawingProgramCache::update() {
if(unsortedComponents.size() >= 750 && (std::chrono::steady_clock::now() - lastBvhBuildTime) >= std::chrono::seconds(7))
if(unsortedComponents.size() >= 1000 && (std::chrono::steady_clock::now() - lastBvhBuildTime) >= std::chrono::seconds(7))
force_rebuild();
}