Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced output spam from rapid property changes #84795

Merged

Conversation

TheSofox
Copy link
Contributor

Fixes #84499

Previously rapid changes in properties (dragging on colour picker, spinning through the spinner, etc.) would generate a huge amount of Output Log messages in a very short period of time. This would not only flood console, but eat up a lot of RAM.

This change means that the Property change messages use the same system that UndoRedo and History log uses: Identical changes made less than 800 milliseconds apart only give a single output message. Previously, messing around with the colour picker could give hundreds of messages, now it will only give a handful. Since it reuses the same system that , there's both minimal code change and it's consistent.

@TheSofox TheSofox requested a review from a team as a code owner November 12, 2023 14:42
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this change assumes that we use the callback only for editor log. Although it was always the case, so it's probably fine 🤔

@akien-mga akien-mga modified the milestones: 4.x, 4.2 Nov 12, 2023
@TheSofox
Copy link
Contributor Author

Note that this change assumes that we use the callback only for editor log. Although it was always the case, so it's probably fine 🤔

If it's a sticking issue, we could add an "action_was_merged" argument to the callback function, pass the variable along and then make the conditional statement of whether to add a message or not inside the callback function ( void EditorLog::_undo_redo_cbk in editor_log.cpp)

@akien-mga akien-mga merged commit 404c995 into godotengine:master Nov 12, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants