[Libreoffice-commits] core.git: Branch 'private/kohei/xlsx-import-speedup' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Mon Nov 25 12:08:25 PST 2013


 sc/source/filter/oox/workbookfragment.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 512119c67caa0e87f52e26096074a3d768b40ec1
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Nov 25 15:09:10 2013 -0500

    Really disable multi-threaded sheet parsing.
    
    It will be removed later.
    
    Change-Id: Ia6c2711169cd45056cbf85bc8028627d6f57b44b

diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index 81eb2ed..f8b5ef7 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -58,6 +58,8 @@
 #include <queue>
 #include <boost/scoped_ptr.hpp>
 
+#define MULTI_THREAD_SHEET_PARSING 0
+
 #include "oox/ole/vbaproject.hxx"
 
 namespace oox {
@@ -203,10 +205,12 @@ const RecordInfo* WorkbookFragment::getRecordInfos() const
 
 namespace {
 
-class WorkerThread;
-
 typedef std::pair<WorksheetGlobalsRef, FragmentHandlerRef> SheetFragmentHandler;
 typedef std::vector<SheetFragmentHandler> SheetFragmentVector;
+
+#if MULTI_THREAD_SHEET_PARSING
+
+class WorkerThread;
 typedef rtl::Reference<WorkerThread> WorkerThreadRef;
 
 struct WorkerThreadData
@@ -311,9 +315,11 @@ public:
     }
 };
 
+#endif
+
 void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVector& rSheets )
 {
-#if 0 // threaded version
+#if MULTI_THREAD_SHEET_PARSING // threaded version
     size_t nThreadCount = 3;
     if (nThreadCount > rSheets.size())
         nThreadCount = rSheets.size();


More information about the Libreoffice-commits mailing list