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

improve: use chan *message instead of chan []*message as queueCh #1283

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nodece
Copy link
Member

@nodece nodece commented Sep 11, 2024

Motivation

We currently use chan []*message as queueCh, and use the slice to stage the messages to send the message to the parent consumer, this will result in excessive use of memory.

This PR optimizes potentially reducing overall memory overhead.

Modifications

  • Use chan *message instead of chan []*message.
  • Fix test.

@nodece nodece changed the title improve: use chan *message instead of channel []*message as queueCh improve: use chan *message instead of chan []*message as queueCh Sep 11, 2024
@nodece nodece marked this pull request as draft September 12, 2024 07:43
@nodece nodece marked this pull request as ready for review September 13, 2024 08:49
@nodece nodece added this to the v0.14.0 milestone Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant