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 inter-channel message passing #634

Closed
HeikoBornholdt opened this issue Apr 1, 2024 · 2 comments · Fixed by #652
Closed

Improve inter-channel message passing #634

HeikoBornholdt opened this issue Apr 1, 2024 · 2 comments · Fixed by #652

Comments

@HeikoBornholdt
Copy link
Member

Message processing involves passing messages between several channels (e.g., DrasylChannel <-> DrasylServerChannel, <-> DatagramChannel). Currently, messages are passed to the other channel via fireChannelRead/write(andFlush) calls, often resulting in a scheduled task to the target channel's event loop per message.
We can reduce the scheduling overhead by using something like an inbound and outbound channel buffers, where we place all messages to, followed by a scheduled tasks that process the buffer's content.
This change will reduce the number of schedules to one if multiple messages are read or written in a run.

@HeikoBornholdt HeikoBornholdt added enhancement New feature or request java Pull requests that update Java code feature performance and removed enhancement New feature or request java Pull requests that update Java code feature labels Apr 1, 2024
@HeikoBornholdt HeikoBornholdt changed the title Improve inter channel message passing Improve inter-channel message passing Apr 1, 2024
@HeikoBornholdt
Copy link
Member Author

@KevinRoebert thoughts on this?

@HeikoBornholdt
Copy link
Member Author

FYI: Inbound Buffer has been added to DrasylChannel via #644

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

Successfully merging a pull request may close this issue.

1 participant