-
-
Notifications
You must be signed in to change notification settings - Fork 618
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
Consider Cythonizing When compiling #12338
Comments
Hi, some issues to consider, namely performance under ARM64 (x86/x64 binaries will be emulated in Windows 10 on ARM), Cython being optimized for scientific computing and other critical tasks, and compatibility with C extensions and other Python libraries (such as wxPython). Thanks.
|
I believe this has been discussed with @michaelDCurran during one of the NVDA conferences where he said that either this has been attempted and speed improvements were negligible or he don't believe it would make NVDA faster. Obviously the best way to measure this would be to actually try Cythonizing and see what happens. |
Another point to consider is how cythonized modules behave in the context of monkey-patching as quite a few addons use it for different purposes. |
I did some research into this and cythonizing the whole codebase takes a massive amount of time. This would be quite problematic with our current workflow. |
@LeonarddeR It may take a while, but it could most likely be automated. What exactly has to be done? Cython can take raw Python input and can generate code from that; my preferred invocation is something like: |
Is your feature request related to a problem? Please describe.
Not necessarily a problem, but it certainly would make NVDA run faster, possibly also allowing us to remove certain things from nvdaHelper that needed it for the speed.
Describe the solution you'd like
Cythonize the NVDA codebase when building, thus majorly improving speed.
Describe alternatives you've considered
Just keep it the way it is is the only one I can think of. As I said, it's not necessarily a problem, but would be interesting and nice if it could happen.
Additional context
There's a tool for Python, called Cython. Pip install Cython. It turns your Python modules into native C DLLs that Python can handle, with a file extension .pyd. Very similar to the .pyc files, but native C. Having all this be compiled to C code when running would improve speed by a lot. I'm not sure how Cython interfaces with SCons, however.
The text was updated successfully, but these errors were encountered: