Skip to content

Control cooldown and priority #644

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ViezeVingertjes
Copy link

@ViezeVingertjes ViezeVingertjes commented Aug 20, 2025

Before
Same cooldown for all - control could lag under load.
Priorities were ad‑hoc and scattered:
Flood: PATH=2, ADVERT=3, DATA=1
Direct: PATH=1, DATA=0
Zero‑hop: 0
TRACE: 5

After
Control uses shorter cooldown - snappier joins/ACKs.
Priorities centralized via getPriorityFor() and named constants:
PRI_CONTROL_HIGH=0 (ACK/PATH, zero‑hop)
PRI_DATA=1 (REQ/RESPONSE/TXT)
PRI_BEACON=3 (ADVERT)
PRI_TRACE=5 (TRACE)

Introduces separate airtime budget factors for control and data packets in Dispatcher, and refactors Mesh to use a centralized getPriorityFor() method for packet prioritization.
@ViezeVingertjes ViezeVingertjes marked this pull request as ready for review August 20, 2025 11:18
@ripplebiz
Copy link
Collaborator

This is a pretty low-level change, and has impact on EVERY node out there, so we'll need some kind of 'buy in' for changes like this. ie. see if you can get people in the Development channel to run this branch, and get some feedback.
We really need to know if this has benefits or risks, etc.

@ViezeVingertjes
Copy link
Author

This is a pretty low-level change, and has impact on EVERY node out there, so we'll need some kind of 'buy in' for changes like this. ie. see if you can get people in the Development channel to run this branch, and get some feedback. We really need to know if this has benefits or risks, etc.

I totally agree! I'm just sharing some improvements from my personal build in case they're of interest. If they don't fit the project's direction or gain some support, it's nothing lost really. (no pressure)

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.

2 participants