@guruofquality @cjcliffe Greetings !
I've found the definitive cause of #28, and it is entirely SoapyRTLSDR fault :)
This PR fixes 2 things:
asyncBuffs parameter is not read and saved (self-assignment bug)
bufflen inconsistent handling due to a typo, resulting that bufflen = DEFAULT_BUFFER_LENGTH = (16 * 32 * 512) = 262144 no matter what CubicSDR requested.
Now the source of slowdown in CubicSDR is that bufflen was used indirectly through a getStreamMTU() call, which finally dimension array-like incoming buffers handled with memcpy, memove and such.
So after fixing the bufflen handing, I experimented on my machine (Core i7-2630QM Sandy-Bridge laptop, was high-end in 2011)
bufflen = 16384, so MTU of 8192 as was the setting in SoapyRTLSDR v0.22 shows CubicSDR fast as before,
16384 < bufflen < 65536 : no apparent slowdown,
bufflen = 131072 or 262144 (new default) : CubicSDR slows down dramatically.
On one side maybe CubicSDR should be smarter in buffer handling instead of relying on CPU cache, and memove, memcpy but on the other side now bufflen will have to be set carefully depending on the current machine because of its much higher value.
@guruofquality @cjcliffe Greetings ! I've found the definitive cause of #28, and it is entirely SoapyRTLSDR fault :) This PR fixes 2 things:
bufflen = DEFAULT_BUFFER_LENGTH = (16 * 32 * 512) = 262144
no matter what CubicSDR requested.Now the source of slowdown in CubicSDR is that
bufflen
was used indirectly through agetStreamMTU()
call, which finally dimension array-like incoming buffers handled withmemcpy
,memove
and such.So after fixing the bufflen handing, I experimented on my machine (Core i7-2630QM Sandy-Bridge laptop, was high-end in 2011)
bufflen = 16384
, so MTU of 8192 as was the setting in SoapyRTLSDR v0.22 shows CubicSDR fast as before,16384 < bufflen < 65536
: no apparent slowdown,bufflen = 131072 or 262144
(new default) : CubicSDR slows down dramatically.On one side maybe CubicSDR should be smarter in buffer handling instead of relying on CPU cache, and
memove, memcpy
but on the other side nowbufflen
will have to be set carefully depending on the current machine because of its much higher value.