From: Uwe Hermann Date: Thu, 16 Mar 2017 22:29:24 +0000 (+0100) Subject: Increase session saving chunk size for much better performance. X-Git-Tag: pulseview-0.4.0~149 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=9cc264b4361acc503f156e90139c15cd6c324258;hp=9b64f2dfe9179f665ef97c0d0ac992274864f4a4 Increase session saving chunk size for much better performance. Increasing the StoreSession chunk size from 1Msamples to 10Msamples leads to massively faster session saving due to reduced overhead. In some cases a 2x (or more) speed-up has been observed. A further increase to, say, 100Msamples shows no further noticeable improvements. This also has the additional benefit of generating fewer entries/files within the sigrok session (*.sr) output/ZIP files, which can potentially be beneficial for very long captures. --- diff --git a/pv/storesession.cpp b/pv/storesession.cpp index b0f33f4a..52a6be34 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -69,7 +69,7 @@ using sigrok::OutputFlag; namespace pv { -const size_t StoreSession::BlockSize = 1024 * 1024; +const size_t StoreSession::BlockSize = 10 * 1024 * 1024; StoreSession::StoreSession(const std::string &file_name, const shared_ptr &output_format,