sc/source/filter/oox/formulabuffer.cxx | 1 - sc/source/filter/oox/worksheetfragment.cxx | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
New commits: commit 8e70478af81d36b7a513c49640a04093d6c99040 Author: Kohei Yoshida <[email protected]> Date: Tue Sep 17 23:34:11 2013 -0400 In xlsx, a better heuristic is based on worksheet dimension. And start OpenCL kernel compilation right away if the dimension is large enough to make the sheet import slow. Change-Id: Iee3e8dc1f0cb64eb1d8778db19c6edd73e971136 diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx index cc8a50a..21e383f 100644 --- a/sc/source/filter/oox/formulabuffer.cxx +++ b/sc/source/filter/oox/formulabuffer.cxx @@ -65,7 +65,6 @@ void FormulaBuffer::finalizeImport() FormulaDataMap::iterator cellIt = maCellFormulas.find( nTab ); if ( cellIt != maCellFormulas.end() ) { - compileOpenCLKernels(); applyCellFormulas( cellIt->second ); } diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx index b8ad658..93cacd7 100644 --- a/sc/source/filter/oox/worksheetfragment.cxx +++ b/sc/source/filter/oox/worksheetfragment.cxx @@ -511,7 +511,16 @@ void WorksheetFragment::importDimension( const AttributeList& rAttribs ) be set. If the cell A1 exists, the used area will be updated while importing the cell. */ if( (aRange.EndColumn > 0) || (aRange.EndRow > 0) ) + { extendUsedArea( aRange ); + + // Start pre-compiling OpenCL kernels if we have a large number of + // cells to import. The current threshold is 100,000. + double fCellCount = aRange.EndColumn - aRange.StartColumn + 1.0; + fCellCount *= aRange.EndRow - aRange.StartRow + 1.0; + if (fCellCount > 100000.0) + compileOpenCLKernels(); + } } void WorksheetFragment::importSheetFormatPr( const AttributeList& rAttribs ) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
