Skip to content

Revert ShardRunner refactor/simplification#3506

Open
GnomedDev wants to merge 2 commits intoserenity-rs:nextfrom
GnomedDev:revert-shardmanager-rework
Open

Revert ShardRunner refactor/simplification#3506
GnomedDev wants to merge 2 commits intoserenity-rs:nextfrom
GnomedDev:revert-shardmanager-rework

Conversation

@GnomedDev
Copy link
Member

@GnomedDev GnomedDev commented Mar 2, 2026

This causes all events to be dispatched from a single thread, which caused a single core to hang at 100% when deploying to 1.1m guilds. I am not quite sure the exact performance hotspot, but the general idea of dispatching all events from the ShardManager is a bad idea.

This is running on TTS Bot now.

@github-actions github-actions bot added model Related to the `model` module. gateway Related to the `gateway` module. examples Related to Serenity's examples. labels Mar 2, 2026
@mkrasnitski
Copy link
Collaborator

I have a PR that supersedes this almost ready, which moves dispatch back into per-shard tasks but keeps the cleanup to ShardRunner.

@GnomedDev
Copy link
Member Author

Fair enough, just opening this in case others need it as a known good configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples Related to Serenity's examples. gateway Related to the `gateway` module. model Related to the `model` module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants