OpenCyphal / pycyphal

Python implementation of the Cyphal protocol stack.
https://pycyphal.readthedocs.io/
MIT License
120 stars 105 forks source link

Is very slow on Windows #286

Closed silverv closed 9 months ago

silverv commented 1 year ago

Perhaps causes #281 and also affects Yukon usability on Windows devices.

pavel-kirienko commented 1 year ago

@silverv we should try increasing the resolution of the system timer as done in the PyCyphal test suite:

https://github.com/OpenCyphal/pycyphal/blob/029fdb5b5a158372103edf436298bc3559377dd8/tests/conftest.py#L63

More on this in the Windows API docs

silverv commented 1 year ago

It would probably make sense to go for a lower than 6 ms value, ideally a lower than millisecond value

silverv commented 1 year ago

I don't understand why setting the delay even even higher helped the tests

pavel-kirienko commented 1 year ago

Not sure what delay you are referring to. There are no delays here, the referenced API function changes the system timer resolution. It should be possible to go down to 1 ms, I would try that.