Undo Performance Feedback

Blender 2.83 alpha is out with supposed undo improvements but this is no different from other builds :frowning:
This should be priority number 1 in first 2.8 release.

The work is not over yet and it might take few releases before we see good results, so it will take more time.

undo experiments is in a parallel branch under development, and the results obtained are already exciting.
undo-experiments-swap-reread-datablocks
it is likely that we will see the new undo system in blender 2.83 …
it’s just a matter of figuring out if it will be solid enough for this release

1 Like

Current ‘final’ branch is called uuid-undo-experiments-swap-reread-datablocks, and is almost master-ready (besides some known random crashes happening in depsgraph that need to be fixed).

It is still planned for 2.83, but as an experimental feature (to be enabled in preferences), since it is very unlikely we can harden it enough to enable it by default in this release.

Please also note that using this feature in its current state will expose you to rather severe risks (most common issues will be crashes, but there could also be some .blend file corruptions in some corner cases).

12 Likes

Great! Is it possible that since 2.83 will be LTS relase it will be non-experimental or on by default at some point? I mean, that way future new users will see a better performance without having to look for some hidden setting.

I just tested it, I did the same test as the last time, it’s the same scene of the video a few threads before and I did the same thing, the result it’s pretty good!

Finally… moving an object does not mean a super sloooow undo,I hope this can be stabilized because this is the kind of performance needed for a good undo system.

Congrats @mont29

14 Likes

I would not say a hard ‘NO’, but i honestly think this is relatively unlikely to happen. In the end it all depends on how involved and risky will be the fixes for issues found after 2.86 release… LTS aims at stability over all. :wink:

2 Likes

I think as long as the situations where a file can be corrupted are solved, this could remain as an experimental feature that can provoque crashes, but it can be enabled by the user.

The only thing that would stop me from enabling it would be the files thing, @mont29 can you specify a bit more in what situations we can observe such corruption?

Am not aware currently of any actual case leading to file corruption (typically crash will happen before you have an opportunity to save a corrupted file), but we are doing black magic with memory addresses in that work, so it’s very hard to fully rule out that possibility…

4 Likes

Ok, so a good safe guard could be to have several blend1, blend2, blend3 … also, how could you detect a corrupted file? only when you open it after it has been closed? (in case it does not crash)

@mont29 Have you tested uuid-undo-experiments-swap-reread-datablocks with undoing selections? My build on Windows just immediately crashes if I click select a few things in the default scene to load up an Undo stack and then hit Ctrl-Z. I’m not sure what the difference is but I’ve tried both builds with just “make” and “make release”. Still trying to figure out how to get a decent stack trace.

edit: Well, it seems Ctrl-Z crashes for anything on me.

Cannot reproduce here… Could be OS-specific though (would not be the first time windows crashes when linux works fine, even in ASAN debug builds :frowning: )

I can repro the undo crash after select changes as of ad88b84c5df on that branch.

**id_old** was nullptr.

blender.exe!read_libblock(FileData * fd, Main * main, BHead * bhead, const int tag, const bool placeholder_set_indirect_extern, ID * * r_id) Line 9226	C

id_old->recalc = id_old->recalc_undo_accumulated;

EDIT: Of course a few minutes later efee90959fa fixed things up :slight_smile: No immediately obvious crash after trying some things out.

EDIT 2: For folks coming in now, remember to actually ENABLE the new code by going to Preferences → Experimental

Are you guys doing custom builds for this or is there a build somewhere? Was looking at the experimental builds, can’t really see anything on blender.org, for linux at least.

I’m just doing custom windows builds locally. There’s no official build for this particular branch for linux or otherwise. If so, it would show up here: https://builder.blender.org/download/branches/

1 Like

Ye, was wondering about that, wasn’t sure if it’s in the experimental build there. Thanks for clarifying.

Me too, custom build from the test branch :slight_smile:

I tried the undo feature by enabling it in the latest build, and trying to figure out what scenarios it’d be useful in it’s current state.

Didn’t have noticeable speedup sadly, with the feature enabled vs disabled. I have a scene with 1* 40M poly object and a simple 6 poly cube. Undoing simple translations for either of them is still painfully slow compared to any other packages.

Is this supposed to make a difference for scenes with many low/midpoly (1000+) objects only?

That’s weird, you saw my video right?

Are you sure you enabled it in experimental? Becaus for me it worked perfectly fine :slight_smile:

I saw the video, but I also tried the latest master build with the experimental feature enabled, under both linux, windows 10 and macOS.

No Speedup whatsoever with one 40M object, simple translate undo; one 40M object and one 6 poly cube, simple translate undo; or 2000 * 3000 poly objects, simple translate undo.

Out of curiosity, did you try it with a single high poly object (20M+ poly) for just undoing simple translates?