← index #8358Issue #587
Off-topic · high · value 0.075
QUERY · ISSUE

pyboard.py very slow on windows, reason and solution

openby harbaumopened 2022-02-26updated 2024-09-08
toolsneeds-info

I have recently adopted my µPIDE Micropython IDE to use pyboard.py for remote communication. I soon noticed that transfers from the device to the host are 5 times slower under Windows 10 than under Linux. My previous own version did not have such an issue,

It turned out that serial.inWaiting() is awfully slow on Windows 10 and it's being called for every single byte that's being read via read_until().

As a solution I wrote a little buffering serial wrapper.
https://github.com/harbaum/upide/blob/main/src/buffered_serial.py

This can be used in pyboard.py like import buffered_serial as serial in https://github.com/micropython/micropython/blob/0a217624e1d26899986d3e79eb604652da540b00/tools/pyboard.py#L268

This avoids calling inWaiting() permanently and as a result pyboard.py's read performance now feels similar to Linux.

P.S.: This is not yet included in a µPIDE release, so the latest v1.1.0 still shows that slowness.

CANDIDATE · ISSUE

USB problem with Windows

closedby dpgeorgeopened 2014-05-08updated 2025-02-25
bugproposed-close

There have been so far 2 independent reports of a "flaky" serial device on the pyboard. The pyboard works, and the mass storage device appears. The serial driver can be installed and the pyboard is recognised by windows, but the terminal program (eg PuTTY) does not work, or at least works only occasionally. One solution seems to be asserting DTR in the terminal program, if possible.

We need to collect more information about this.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied