From: Uwe Hermann Date: Thu, 16 Mar 2017 22:59:58 +0000 (+0100) Subject: session_driver.c: Increase chunk size for slightly better performance. X-Git-Tag: libsigrok-0.5.0~84 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=df3e608a20620836ecad6d8d4dc6c0b27b1658a8 session_driver.c: Increase chunk size for slightly better performance. Increasing the chunk size from 512ksamples to 4Msamples leads to slightly faster session file loading from sigrok session (*.sr) files in frontends, while not looking too "chunky". The performance increase is not really massive, but still noticeable. A further increase to, say, 10 or 100Msamples shows no further noticeable improvements. --- diff --git a/src/session_driver.c b/src/session_driver.c index 0fecd6b8..79a3b37b 100644 --- a/src/session_driver.c +++ b/src/session_driver.c @@ -31,7 +31,7 @@ /* size of payloads sent across the session bus */ /** @cond PRIVATE */ -#define CHUNKSIZE (512 * 1024) +#define CHUNKSIZE (4 * 1024 * 1024) /** @endcond */ SR_PRIV struct sr_dev_driver session_driver_info;