"Fast Undo for large databases" implications?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

"Fast Undo for large databases" implications?

Post by Abelius »

Hi there,

When I delete an "old" node inside a conversation, there's a huge delay for the editor to become responsive. And I've been bothered by this for a long time until I've found that 'Fast Undo...' checkbox in the Database tab. Turning that on has solved the delay problem instantly.

Now I'm asking myself how I've been able to live without it, but I also wonder if using that setting has some hidden disadvantage I'm not aware of. It was turned off when I installed DS, so...

That's my doubt... :roll:

Thanks!
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22061
Joined: Thu Jul 18, 2013 1:27 pm

Re: "Fast Undo for large databases" implications?

Post by Tony Li »

With 'Fast Undo' checked, the Dialogue Editor window uses slightly more RAM. The difference is fairly insignificant. This is why it's ticked by default in later versions of the Dialogue System.

When 'Fast Undo' is checked, the editor makes a quick in-memory copy of the database that it can revert to if you undo the deletion.

When it's unchecked, the editor does a byte-by-byte comparison and records each changed byte in an undo log. Unity's comparison code isn't very efficient, so it's faster to bypass it by using 'Fast Undo'.
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Re: "Fast Undo for large databases" implications?

Post by Abelius »

Thanks for the explanation. I really can't live without this enabled now. :mrgreen:

However, I've noticed that it gets unchecked every time I start Unity. It happens to me at least.
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22061
Joined: Thu Jul 18, 2013 1:27 pm

Re: "Fast Undo for large databases" implications?

Post by Tony Li »

Try closing the Dialogue Editor window.

It appears that some versions of Unity don't send OnDisable to open editor windows when quitting Unity. The Dialogue Editor window saves the value of this checkbox to EditorPrefs in OnDisable. The next version of the Dialogue System will save the checkbox to EditorPrefs as soon as it changes. In the meantime, if you close and re-open the Dialogue Editor, it will save the checkbox value.
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Re: "Fast Undo for large databases" implications?

Post by Abelius »

Yup, it did work. Thank you!
Unity 2019.4.9f1
Dialogue System 2.2.15
Post Reply