Undo Performance Feedback

Maybe subdivision objects in the scene?

@mont29 @nokipaike

Iā€™ve tested the wanderer scene, so far the results are as follows, using the undo timer:

The result with the UNDO experimental feature enabled is this:

Warning: 10 x Undo/Redo: 26472.0778 ms, average: 2647.20778000 ms

The result in an empty scene is this (UNDO experimental enabled):

Warning: 10 x Undo/Redo: 0.0304 ms, average: 0.00304000 ms

This is the result in the ā€œWandererā€ scene with the UNDO experimental DISABLED:

Warning: 10 x Undo/Redo: 28793.4170 ms, average: 2879.34170000 ms

This is the result with an empty scene (UNDO experimental DISABLED):

Warning: 10 x Undo/Redo: 0.0549 ms, average: 0.00549000 ms

So as you can see there is a super small diference in this scene, also from a subjective perspective I cannot notice a difference either, no subdivision surface involver, just moving an object without modifiers, the undo time is basically the same, no improvement felt.

Enabled: 2.6s, Disabled: 2.8s, so no actual real improvement.

I have not tested the specific undo branch, Iā€™m not sure if itā€™s up to date, but it seems that in this case there ii no difference performing the very exact action, simply moving an object.

Iā€™m wondering what could be causing this lack of performance in this scene, since in the end the action performed itā€™s just to move an object.

1 Like

Retitled the topic to make it clear this is now about feedback on the undo performance project.

More changes have been committed today, which should help. There are still cases where undo is known to be slow, for example undoing object add/remove operations. Also note that you have to restart Blender after changing the experimental option for it to take full effect.

I also modified the Undo/Redo timer to measure the full cost of undo, since what it was measuring before could be very different from the time you would see when actually undoing.

After this Iā€™m seeing about a 9x speedup undoing an object move in the wanderer scene.

2 Likes

There is any plan about improve perfomance when you add or remove and object in big scenes?

Yes. And note that what should be slow now is undoing the add/remove operation itself (and maybe the operation right after that). It shouldnā€™t make undoing permanently slower as was happening before in an earlier version of the undo speedup.

2 Likes

I donā€™t fully understand this.

What you mean is that the time shown is more real, but the perceived time wonā€™t change too much or that after the latest commits the undo speed itā€™s actually faster?

The important thing is the actual time perceived by the user, based on my tests the time I perceived when undoing something in the Wanderer scene was pretty similar with and without the Speedup enabled.

Iā€™ll repeat the test to see if I can actually perceive the speedup with the recent changes (Iā€™ll also take not of the measurements and compare it with a UX perspective)

Thanks!

There were two changes. One to make undo actually faster, and another to make the timer measure more accurately the actual time it takes to undo.

4 Likes

Awesome, thanks :slight_smile:

New changes seem faster (mostly trying heavy object translate undo) but it still seems to be dependent on scene size. With a single 10M poly cube itā€™s not too bad but as soon as it comes to a 5gb< production scene undo starts taking a few seconds between steps for simple operations.

Again, much faster as before, but the difference to other softwares is really showing in big scenes.

One interesting thing, I made a scene with a 100M poly cube, did a few translates and undoā€™s, deleted the cube, created a new 10M poly cube, and undo seemed to be just as slow as with the 100M poly cube.

1 Like

I noticed that switching from object to edit mode and viceversa is still slow when using undo.

Really unfortunate because I like to keep the heavy modifiers disabled in edit mode, for better modeling performance, and then press tab after a change to see what the mesh looks like with everything turned on.

Itā€™s not even a heavy scene and pressing tab switches modes instantly, but if the Undo is the one doing the mode switch then I have to wait a few seconds. I imagine it would be worse with a heavier scene.

I wonder if thereā€™s a way exclude mode switching from the undo history or is that a terrible workaround?

4 Likes

I hope this isnā€™t turned on by default when 2.83 goes gold. There are too many non repeatable bugs that Iā€™ve run into. I would file a bug report, but as soon as I open the file that I see the bug in and try the operation again, the bug doesnā€™t present itself. I think the issues only arise after working in the program for some time. The two major issues Iā€™ve had:

  1. Appending a large scene with an object will often make other objects disappear with only an empty in their place. This happened 4-5 times when working for a full day with the experimental undo feature on. It didnā€™t happen at all with the feature disabled working two full days.
  2. Undo with a dense sculpt mesh mangles the mesh. This happened twice while working for only one hour.

When these errors present themselves, the only way to get back your work is to revert to the last save or hopefully open the autosave file.

Undo feels much faster when undoing move/rotate/scale operations!

The biggest general workflow slow down now appears to be when attempting to perform multiple undoā€™s in rapid succession that involve going back and forth between edit and object modes (for example, enter edit mode + inset a face > object mode > edit mode + bevel an edge > object mode > edit mode + scale a face, etc.).

Very impressed with the undo speed in object mode and hoping the same improvements can be made to ctrl + zā€™ing through the undo history when there are interwoven edit mode and object mode actions to back up through!

3 Likes

I didnā€™t do any specific tests lately, but I forgot to turn off undo speedup (using the latest builds, updated every other day) on my end for the last 2 weeks.

In production scenes I have to admit I didnā€™t have that ā€œoh crap, did I just press ctrl-z?ā€ moment I had before. Undo wasnā€™t frustratingly slow, definitely something that can work. To be honest, Iā€™m sure that if weā€™d make comparisons with simple cases like undoing high poly object translates itā€™d still be slower than most other packages currently used in production, but I think this could work.

I did get more crashes. Since I use addons and some features that can be prone to crashing Blender (shader to rgb, switching from eevee to cycles, viewport optix denoise with new graphics cards, etc.) itā€™s almost impossible to recreate on my end.

Looking good so far though. I really hope simple case specific comparisons are being made compared to other packages. Other than that I can say that this (if itā€™s stable in more complex scenes) is enough for smaller scale productions for sure. Iā€™m planing on enabling it for other senior artists at our studio to see how they feel.

Yeah. I saw the same. Object level undo is generally much better. Usually 2-10x faster. But I tbink there is a known issue yet they are working on with deleting / duping objects that can slow it down again.

Also yes. Going in and out of edit undo is slow. I really hope they can fix that as well. Since itā€™s not avoidable and people will hit that slowdown all the time.

But Iā€™m very glad to see some nice progress in any case. I saw they moved the undo task to continue work for 2.9.

Really happy with the undo performance so far.

One quick question for people working with large scenes (4-8gb scenes, around 100-200M tris, 50-100* 4k textures, few subsurf modifiers) though - I noticed Blender freezing every 5-10 seconds for a few seconds every time, unless disabling global undo (using high end hardware, 10980x, 128gb ram, 2080 video cards). I got into the habit of doing so despite it being a bit risky.

Is this something thatā€™s expected to improve?

Latest UNDO kicks balls! Just wanted to say how happy I am with it. Itā€™s really awesome and now Undoing doesnā€™t disrupt my flow. Damn, it makes such a difference. Devs, thank you very much for your work. Please do more optimization work, when everything is so performant it makes you lose time and be in the flow forever. Blender - creativity unleashed! Please more performance fixes! Love ya all!

I just tested the new undo in 2.9 vs 2.82 and wow what a difference. In my production scene I went from 4 min per undo to 8 seconds that is about 30 times faster. I just want to say thank you!

5 Likes

Itā€™s quite sad, but for me undo performance in 2.9 is the sameā€¦ tested just now.

What version of blender were you testing?

Make sure you donā€™t have the Undo Legacy enable on the experimental tab on the preferences. I see huge differences, in scenes with thousands of objects.