Skip to content

Optimizing and cleaning out the callback hell #28

@sirpalee

Description

@sirpalee

At the moment we rely heavily on callbacks to get the scene updates propagated, but it's causing significant slowdowns with many (5000+) animated objects, which can be easily the case in production.

The issue is easy to reproduce, create a small hierarchy with a few animated transforms (5 or 6 nodes), then duplicate the hierarchy 1000 times and keep the input connections. Hydra draws objects very fast (faster than VP2), but once animation is played back, the framerate drops to ~3fps compared to 30. Though VP2 is doing some sort of caching (the first playback is slower than the second one), but we should still be able to do better than 3 fps. I suspect simplifying the transform related callbacks could be an easy win. While there are simpler ways to track transform (MDagMessage's world matrix changed callback) changes than tracking parameter changes, we still need to deal with visibility in an efficient way.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions