Page 1 of 1

"Fast Undo for large databases" implications?

Posted: Sat Feb 17, 2018 12:34 pm
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!

Re: "Fast Undo for large databases" implications?

Posted: Sat Feb 17, 2018 2:47 pm
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'.

Re: "Fast Undo for large databases" implications?

Posted: Mon Feb 19, 2018 1:58 pm
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.

Re: "Fast Undo for large databases" implications?

Posted: Mon Feb 19, 2018 2:39 pm
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.

Re: "Fast Undo for large databases" implications?

Posted: Tue Feb 20, 2018 6:53 am
by Abelius
Yup, it did work. Thank you!