Increase decoding chunk size for much better performance.
authorUwe Hermann <uwe@hermann-uwe.de>
Mon, 6 Mar 2017 07:41:42 +0000 (08:41 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Mon, 6 Mar 2017 10:46:44 +0000 (11:46 +0100)
Increasing the (max) decoding chunk size from 4ksamples to 10Msamples
leads to massively faster protocol decoding due to reduced overhead
related to srd_session_send() and other functions invoked internally.

In some cases a 2x (or more) speed-up has been observed.

pv/data/decoderstack.cpp

index c5a0e4a7a36d54957e2c96312a796782e1b7e90a..c216d8d2627344264d940e4ab7a8d1a3db26c6d5 100644 (file)
@@ -53,7 +53,7 @@ namespace data {
 
 const double DecoderStack::DecodeMargin = 1.0;
 const double DecoderStack::DecodeThreshold = 0.2;
-const int64_t DecoderStack::DecodeChunkLength = 4096;
+const int64_t DecoderStack::DecodeChunkLength = 10 * 1024 * 1024;
 const unsigned int DecoderStack::DecodeNotifyPeriod = 1024;
 
 mutex DecoderStack::global_srd_mutex_;