On linux (I tested a laptop and a raspberry pi) read() returns immediately if there is no data. It does not wait for a timeout to occur. The timeout should be about 16 ms, per the FTDI documentation. Polling for data thus results in high CPU usage on linux systems. On the Pi (running raspbian), I recompiled libusb (1.0.19) and libftdi (1.1) and reinstalled pylibftdi (0.14.1) and got the same results.
I used the following code:
import time import pylibftdi dev = pylibftdi.Device() N = 0 t0 = time.time() while True: dev.read(62) N += 1 if time.time() - t0 > 1: print "Read frequency (approx.): %.1f Hz" % N t0 = time.time() N = 0
On my Mac, I get a read frequency of 63 Hz (16 ms timeout) and about 2 % CPU usage. On the Pi, I get a frequency varying from 700 - 900 Hz and 30 - 40 % CPU usage.