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
GameSettings, EnableDiscordService. #19343
Conversation
This sounds rather excessive. Do you have any idea what in that thread is using so much time? |
See #19035 It aggressively tries to reconnect. The 33% CPU time may not be 'self' time but time spent waiting in a 'connect' call. The DiscordRPC client does use a backoff period in reconnecting if an error occurs once - after - the connection was setup - if it was aborted. It seems it is not used when the connect call fails. Perhaps we could request this as feature. An alternative solution is to listen for the connection failure event and after start a new RPC client only after a backoff period. Main loop in RPC thread. Percentage is different now - I assume because of the impact of the logging thread.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having a button to turn this off makes sense in any case.
Any particular reason this isn't showing up as a checkbox under "Settings" -> "Advanced"? Expecting (changelog-observant) users to figure out that the "Game.EnableDiscordService" command option has an equivalent, unprinted key in "settings.yaml" is a bit of a stretch. |
GameSettings.EnableDiscordService
to allow users to manually edit the setting.yaml to disable the start of the Discord thread by mods that have the DiscordService trait.Useful for players that do not use a local Discord client. And useful to be able to exclude the Discord thread from profiling reports. The thread shows up using 33% of CPU time.