https://issues.apache.org/ooo/show_bug.cgi?id=120847
--- Comment #9 from Tan Li <[email protected]> --- (In reply to comment #0) > Optimizing algorithm of creating cache: Current algorithm will visit all > cells one by one to generate cache, need binary search in each column. New > algorithm will create cache for each column Previous algorithm use "new ScDPItemData( pDoc, nRow, nCol, nDocTab )" for each cell to construct cache item "ScDPItemData", this will call "ScColumn::GetCell( SCROW nRow )" ,"pDoc->HasValueData( nCol, nRow, nDocTab )", "pDoc->HasData( nCol,nRow, nDocTab )" , and all these three function use binary search to locate the cell and its properties. Too many redundant search is low efficient. In our solution, for one column, only using binary search for one time to locate cell in start row, for each "ColEntry pItems[nIndex]" in column,using "ScDPItemData( sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF )", or "ScDPItemData( const String& rS, double fV, sal_Bool bHV, const sal_uLong nNumFormat, sal_Bool bData )" for construction; and for each cell between "ColEntry pItems[nIndex]",using"ScDPItemData()" for construction, and all of these function avoid binary search. "pCell->HasValueData()", "pCell->IsBlank()" are used for replacement. ScDPTableDataCache::AddData(...) is also modified to avoid redundant number format process. -- You are receiving this mail because: You are the assignee for the bug.
