Dear All,
I am not sure if i should open a ticket so I am writing here.
Remark: I am very new to python (1 week).
I found that small change improves max read transfer speed.
In my case from ~5MB/s to ~15MB/s (~15MB/s is the limit for this device).
The problem is in initialization of _interop.as_arrary
Example in libusb1.py in __read function the memory is allocated this way:
data = _interop.as_array((0,) * size)
this creates a tuple of size and then an array.
If you change initialization to
data = _interop.as_array( '\x00' * size )
makes it much faster.
Example speed test: http://dl.dropbox.com/u/2937630/code/array_init_test.py
For write - core.write could recognize if it receives type==array.array ant
not to reinitialize memory.
Best Regards,
Tomek
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users