https://bz.apache.org/ooo/show_bug.cgi?id=123429
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #11 from [email protected] --- It spends a lot of time in SheetDataBuffer::mergeXfIdRanges(), probably because of the O(n^2) nested loops iterating over ranges (line 866 "while" loop containing the line 871 "for" loop, both looping over "maXfIdRanges"): 858 void SheetDataBuffer::mergeXfIdRanges() 859 { 860 if( !maXfIdRanges.empty() ) 861 { 862 // get row index of last range 863 sal_Int32 nLastRow = maXfIdRanges.rbegin()->second.maRange.StartRow; 864 // process all ranges located in the same row of the last range 865 XfIdRangeMap::iterator aMergeIt = maXfIdRanges.end(); 866 while( (aMergeIt != maXfIdRanges.begin()) && ((--aMergeIt)->second.maRange.StartRow == nLastRow) ) 867 { 868 const XfIdRange& rMergeXfIdRange = aMergeIt->second; 869 // try to find a range that can be merged with rMergeRange 870 bool bFound = false; 871 for( XfIdRangeMap::iterator aIt = maXfIdRanges.begin(); !bFound && (aIt != aMergeIt); ++aIt ) 872 if( (bFound = aIt->second.tryMerge( rMergeXfIdRange )) == true ) 873 maXfIdRanges.erase( aMergeIt++ ); 874 } 875 } 876 } but then it also takes long in other parts of the code, including SheetDataBuffer::setCellFormat:806, and in a debug build (if DBG_UTIL is defined) even in ScAttrArray::TestData(). But it does load eventually. -- You are receiving this mail because: You are on the CC list for the issue. You are the assignee for the issue.
