Skip to content

perf: optimize polling thread and UDP port handling#151

Open
jiangdongzi wants to merge 6 commits intonacos-group:masterfrom
jiangdongzi:feature/polling-and-udp-optimization
Open

perf: optimize polling thread and UDP port handling#151
jiangdongzi wants to merge 6 commits intonacos-group:masterfrom
jiangdongzi:feature/polling-and-udp-optimization

Conversation

@jiangdongzi
Copy link

  1. Optimize polling thread wake-up mechanism:

    • Use condition variable only when polling list is empty
    • Use normal sleep for regular polling interval
    • This improves responsiveness when adding new services
  2. UDP port improvements:

    • Support setting UDP port to 0 for automatic port assignment
    • System will automatically assign an available port
    • Actual port number is retrieved using getsockname

This change improves the efficiency of service discovery and makes the UDP port configuration more flexible.

1. Optimize polling thread wake-up mechanism:
   - Use condition variable only when polling list is empty
   - Use normal sleep for regular polling interval
   - This improves responsiveness when adding new services

2. UDP port improvements:
   - Support setting UDP port to 0 for automatic port assignment
   - System will automatically assign an available port
   - Actual port number is retrieved using getsockname

This change improves the efficiency of service discovery and
makes the UDP port configuration more flexible.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zhiyuan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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