incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 120847] Optimizing algorithm of creating pivot table cache when loading a xls file with pivot table
Date Wed, 12 Sep 2012 09:13:50 GMT

--- Comment #9 from Tan Li <> ---
(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

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.
View raw message