Replies: 1 comment 1 reply
-
|
Thanks for opening this discussion. I wanted to provide some context on the performance characteristics of the Cython implementation. While isolated benchmarks may show modest improvements (~2%), the real benefits become apparent in production environments with heavy mDNS traffic. In real-world deployments where systems need to process high volumes of incoming mDNS packets, we've observed CPU utilization drop from approximately 14% to 2% with the Cython implementation. This significant reduction makes the Cython version critical for system stability in these high-traffic scenarios. The library is specifically designed to handle environments where incoming traffic processing would otherwise overwhelm the system, and the Cython optimizations are a key part of achieving this goal. That said, I understand the concerns about wheel size and the desire for flexibility. We would be open to accepting a PR that adds pure-Python wheels as an installation option, allowing users to choose based on their specific requirements - whether they prioritize smaller package size or need the performance benefits for high-traffic environments. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using this module and for me installation size is important. The wheels for this module are actually quite large. This is because of the Cython optimizations. As specified in the README, the cython backend is optional. But while it's optional, it's also on by default. This makes installation take significantly longer and installation size much bigger. And for my use case, I benchmarked the speed improvement. For some operations it is there but it's not bigger than about 2% and for some operations it's not measurable.
The problem is that the current way to not build the cython extensions is by setting
SKIP_CYTHON=1in the environment. This is not something I can specify as a build specifier in mypyproject.tomlor inrequirements.txtor similar. It would be great if the cython implementation would become an 'extra' or so so that we can choose to not install the cython optimizations if we want?(as a side note, I found that the
python-zeroconfpackage that is distributed in debian and ubuntu, also is built without cython .so files)Beta Was this translation helpful? Give feedback.
All reactions