[beast] TOOLS: bsefextract uses a data cache now to improve performance



commit 912ccc3ae2de9203565769647232c6b1962cde5a
Author: Stefan Westerfeld <stefan space twc de>
Date:   Sat Jan 29 12:37:47 2011 +0100

    TOOLS: bsefextract uses a data cache now to improve performance

 tools/bsefextract.cc |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/tools/bsefextract.cc b/tools/bsefextract.cc
index 1d8c991..c22b646 100644
--- a/tools/bsefextract.cc
+++ b/tools/bsefextract.cc
@@ -1551,8 +1551,18 @@ main (int    argc,
       exit (1);
     }
 
+  /*
+   * use a data cache to speedup reading
+   */
+  GslDataCache *dcache = gsl_data_cache_from_dhandle (dhandle, /* min_padding */ 8);
+  assert (dcache);
+
+  GslDataHandle *cached_dhandle = gsl_data_handle_new_dcached (dcache);
+  error = gsl_data_handle_open (cached_dhandle);
+  assert (!error);
+
   /* extract features */
-  Signal signal (dhandle);
+  Signal signal (cached_dhandle);
 
   if (options.channel >= signal.n_channels())
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]