Skip to content

Added DISABLE_DYNAMIC_RATE_LIMITING compilation toggle#207

Open
AM-Shafin wants to merge 2 commits into
Morcules:mainfrom
AM-Shafin:fix-issue-206
Open

Added DISABLE_DYNAMIC_RATE_LIMITING compilation toggle#207
AM-Shafin wants to merge 2 commits into
Morcules:mainfrom
AM-Shafin:fix-issue-206

Conversation

@AM-Shafin

@AM-Shafin AM-Shafin commented Jun 22, 2026

Copy link
Copy Markdown

Added DISABLE_DYNAMIC_RATE_LIMITING which should make the library use less CPU, costing only a tiny bit slow sending speed as described.

@Morcules

Copy link
Copy Markdown
Owner

Thank you for the contribution, I really appreciate the help

There’s just a few things missing:

  • In process_packets, there’s a packet type that handles the delay signals .
  • In send_packets there’s a usleep function handling rate limiting.
  • Please remove last_index_checked and last_chunks_received_number from SwiftNetPendingMessage.

Again, thank you for your help. If you have any questions don't mind asking me. I will try to merge it ASAP.

@Morcules Morcules linked an issue Jun 22, 2026 that may be closed by this pull request
@AM-Shafin

Copy link
Copy Markdown
Author

Hello, thank you very much for making a detailed comment on the parts I've overlooked. It was really helpful since I'm very new to "contribution" and network related projects.

Right now I'm trying to work on the last point, about removing the 2 variables called last_index_checked and last_chunks_received_number from the struct SwiftNetPendingMessage{} , but if I search the project for their use, it seems these variables are being used quite a few times in process_packets.c file.

Apologies if asking the obvious: should I wrap the 2 stated variables in #ifndef DISABLE_DYNAMIC_RATE_LIMITING like I did for other parts? If so my code is ready to push online.

Thank you in advance for your patience!

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.

Make Dynamic rate limiting be a compile-time feature

2 participants