Skip to content

Conversation

@GnomedDev
Copy link
Member

Currently, Event is boxed during deserialisation only to be dereferenced in Shard::handle_gateway_dispatch and boxed again afterwards. This changes the box dance to dereference as late as possible, during cache updating, in hope that only fields matched on are memcopied.

@github-actions github-actions bot added model Related to the `model` module. gateway Related to the `gateway` module. labels Mar 26, 2025
Copy link
Member

@jamesbt365 jamesbt365 left a comment

Choose a reason for hiding this comment

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

I think this looks good, but i'm not the most familiar with allocation shenanigans!

@GnomedDev GnomedDev merged commit d29b7a6 into serenity-rs:next Mar 26, 2025
23 of 24 checks passed
@GnomedDev GnomedDev deleted the avoid-reboxing-event branch March 26, 2025 19:27
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Mar 26, 2025
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Mar 26, 2025
GnomedDev added a commit that referenced this pull request Apr 28, 2025
GnomedDev added a commit that referenced this pull request May 19, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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