dhylands / rshell

Remote Shell for MicroPython
MIT License
915 stars 131 forks source link

rshell takes too much time to communicate #158

Open pulkin opened 3 years ago

pulkin commented 3 years ago

My rsync, for example, takes 40 seconds or so with a very few folders. Partially because every single remote command resets the module and re-compiles (small) chunks of code.

davehylands commented 3 years ago

Yep - I agree. When I originally wrote rshell, it was only running with the pyboard, which has a direct USB connection. MCUs like the EPS32 or ESP8266 which don't have direct USB (and use an external USB-to-serial chip) suffer from this problem more than the other devices.

I've always wanted to implement a comms layer which gets uploaded to the remote device once and have rshell communicate with the remote device using that, but that would require some fairly extensive changes,

ropg commented 3 years ago

I fixed https://github.com/dhylands/rshell/issues/27 and some other people's issues (or so I believe), with a -s, '--suppress-reset` command-line option. Not only was it slowing things down, it was also messing with people whose board is in a state where something doesn't cleanly unload and the gc turns the soft-reboot into a hard one, which messes with the send/expect sequences in pyboard.

Pull Request is in, see the issue for all the details.