add comment about bottleneck

This commit is contained in:
SamGondelman 2017-09-22 10:02:41 -07:00
parent 9f12d3a365
commit be27376c52

View file

@ -222,12 +222,14 @@ void EntityTreeRenderer::updateChangedEntities(const render::ScenePointer& scene
_renderablesToUpdate.insert({ entityId, renderable });
}
if (!_entitiesInScene.empty()) {
for (const auto& entry : _entitiesInScene) {
const auto& renderable = entry.second;
if (renderable) {
renderable->update(scene, transaction);
}
// NOTE: Looping over all the entity renderers is likely to be a bottleneck in the future
// Currently, this is necessary because the model entity loading logic requires constant polling
// This was working fine because the entity server used to send repeated updates as your view changed,
// but with the improved entity server logic (PR 11141), updateInScene (below) would not be triggered enough
for (const auto& entry : _entitiesInScene) {
const auto& renderable = entry.second;
if (renderable) {
renderable->update(scene, transaction);
}
}
if (!_renderablesToUpdate.empty()) {