NLA Tracks cause lower performance with Armature Ghost
Closed, ArchivedPublic


Windows 7 GTX 770 oc

2.79 RC2 7b397cd

Too many keyframes in an action, causes lag while using Armature ghost.
Using Tracks multiplies the factor of the lag.

The file contains only a skeleton and several animation tracks, however the animation is intended for NSFW material.

Default/Without Ghost:

  1. As-is: 10-12fps
  2. Delete NLA tracks: 30fps
  3. Push active action to NLA track: 60fps
  4. Tweak NLA track: 25-28 fps

With Ghost (Range 1, Selected only, with nothing selected):

  1. As-is: 4-5 fps
  2. Delete NLA tracks: 16-20fps
  3. push active action to NLA track: 60fps (ghost is ignored/unavailable)
  4. Tweak NLA track: 12-13 fps

#2 and #4 have a similar performance because other tracks aren't being used but #4 is lower because it actually is using a track.

For #2, without tracks, Ghost set to Range 6 still does 20fp and Range 30 does around 9fps.


Bastien Montagne (mont29) triaged this task as Normal priority.

@Joshua Leung (aligorith) will let you handle this, but would say there is no bug here? Mere piling of evaluation work leading to slower FPS, kind of expected…

Joshua Leung (aligorith) closed this task as Archived.Sep 12 2017, 2:16 AM

This isn't really a bug, as some performance drop is to be expected.

Drawing armature ghosts *will* necessarily be slower, as on every frame played back, you need to evaluate the armature <frame_range> + 2 times (i.e. once to calculate the pose normally, <frame_range> times to draw each of the ghosted frames, and once more to restore everything back to the original state). And this doesn't include the time taken to draw all the bones in each of these poses either For anyone who wonders why we don't have mesh ghosting, this is the reason right there - it already takes so long calculating just the armature itself and only the bones, without having to do this for multiple high-polycount meshes too.

What this report this illustrate is that there are some bottlenecks in the NLA code. While there isn't that much that can be done about some of these (e.g. NLA remapping applied to the keyframes), I did find that there is a particular bottleneck in nlaevalchan_find_match() that does need to be addressed (it's currently a naiive linear-search over all the properties animated in a particular NLA stack which could be converted to some hash/tree lookups). I've noted this on my todolist for the coming weeks.

Thanks for the report anyway.

Oh, and I forgot to mention: To increase your framerates, I strongly recommend you to reduce the number of open animation editors per editor to only a single one. Currently you've got all 3 open + the timeline, which does add up :)