]> sigrok.org Git - pulseview.git/commitdiff
Increase session saving chunk size for much better performance.
authorUwe Hermann <redacted>
Thu, 16 Mar 2017 22:29:24 +0000 (23:29 +0100)
committerUwe Hermann <redacted>
Thu, 16 Mar 2017 22:37:08 +0000 (23:37 +0100)
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.

pv/storesession.cpp

index b0f33f4a7a2ae674f2253ca16bedf11362475dfb..52a6be34c490fe27cb9bcfb3cf263c5a47b530df 100644 (file)
@@ -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<OutputFormat> &output_format,