[python-win32] optimizing code to read serial port

Tim Roberts timr at probo.com
Sun Feb 16 09:05:21 CET 2014


On Feb 14, 2014, at 6:01 PM, Tony Cappellini <cappy2112 at gmail.com<mailto:cappy2112 at gmail.com>> wrote:
I'm trying to determine if it's possible optimize the python code so that dumping the data will occur faster. Currently, it takes ~25 minutes at 9600 baud to dump 8-15 MB of data.

There’s something wrong with your math.  At 9600 baud, you average just under 1,000 bytes per second.  At 1,000 bytes per second, 15 MB will take 15,000 seconds, which is just over 4 hours.  That’s straight wire time — it doesn’t matter what language you’re using to pack the wire.

25 minutes will get you 1.5MB.  So, either you’re not really running 9600 baud, or you’re not really sending as much data as you think you are.
--
Tim Roberts, timr at probo.com<mailto:timr at probo.com>
Providenza & Boekelheide, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140216/b120d925/attachment.html>


More information about the python-win32 mailing list