Difference between revisions of "Calc/Performance/CellStylesOfOoxML"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Created page with " If there are a lot of cell styles in MS 2007 .xlsx file, when loading the file in Aoo, it will take about 20 seconds to create the cell styles. After analyze the sample file, th…")
 
Line 1: Line 1:
 
 
If there are a lot of cell styles in MS 2007 .xlsx file, when loading the file in Aoo,
 
If there are a lot of cell styles in MS 2007 .xlsx file, when loading the file in Aoo,
 
it will take about 20 seconds to create the cell styles.
 
it will take about 20 seconds to create the cell styles.
Line 7: Line 6:
  
 
Here is the result data by the rational purify.
 
Here is the result data by the rational purify.
 +
 
Calls: 178,325
 
Calls: 178,325
 
F+D: 25,128,429
 
F+D: 25,128,429
 +
 
Calls: 4,268
 
Calls: 4,268
 
F+D: 24,404,739
 
F+D: 24,404,739
 +
 
1) ScCellRangesBase::setPropertyValues Calls: 45,336
 
1) ScCellRangesBase::setPropertyValues Calls: 45,336
 
F+D: 13,999,231
 
F+D: 13,999,231
 +
 
2) ScCellRangesBase::setPropertyValue Calls: 36,334
 
2) ScCellRangesBase::setPropertyValue Calls: 36,334
 
F+D: 8,745,959
 
F+D: 8,745,959
 +
 
3) ScStyleObj::setPropertyValues Calls: 28,282
 
3) ScStyleObj::setPropertyValues Calls: 28,282
 
F+D: 10,547,312
 
F+D: 10,547,312
 +
 
1)oox::xls::OoxSheetDataContext::onCreatContext 1) oox::xls::OoxSheetDataContext::importRow
 
1)oox::xls::OoxSheetDataContext::onCreatContext 1) oox::xls::OoxSheetDataContext::importRow
 
 
 
oox::xls::WorksheetData::writeXfldRowRangeProperties
 
oox::xls::WorksheetData::writeXfldRowRangeProperties
 +
 
oox::xls::StylesBuffer::writeCellXfToPropertySet
 
oox::xls::StylesBuffer::writeCellXfToPropertySet
 
 
 
oox::xls::StylesBuffer::writeFontToProperSet
 
oox::xls::StylesBuffer::writeFontToProperSet
 +
 
oox::xls::StylesBuffer::writeBorderToProperSet
 
oox::xls::StylesBuffer::writeBorderToProperSet
 +
 
oox::xls::Allignment::writeToPropertySet
 
oox::xls::Allignment::writeToPropertySet
 +
 
oox::xls::StylesBuffer::writeFillToPropertySet
 
oox::xls::StylesBuffer::writeFillToPropertySet
 +
 
4) ScStyleObj::setPropertyValue Calls: 36,334
 
4) ScStyleObj::setPropertyValue Calls: 36,334
 +
 
F+D: 8,745,959
 
F+D: 8,745,959
 +
 
Calls:178,308
 
Calls:178,308
 +
 
F+D: 5,538,047
 
F+D: 5,538,047
 +
 
Calls: 158,771
 
Calls: 158,771
F+D: 4,810,522
+
 
 +
F+D: 4,810,522
 +
 
1) ScCellRangesBase::setPropertyValues
 
1) ScCellRangesBase::setPropertyValues
2) ScCellRangesBase::setPropertyValue
+
 
3) ScStyleObj::setPropertyValues
+
2) ScCellRangesBase::setPropertyValue
 +
 +
3) ScStyleObj::setPropertyValues
 +
 
2)oox::xls::OoxSheetDataContext::onEndElement 1) oox::xls::WorksheetHelper::setCellFormat
 
2)oox::xls::OoxSheetDataContext::onEndElement 1) oox::xls::WorksheetHelper::setCellFormat
 
 
 
oox::xls::WorksheetData::writeXfldRowRangeProperties
 
oox::xls::WorksheetData::writeXfldRowRangeProperties
 +
 
oox::xls::StylesBuffer::writeCellXfToPropertySet
 
oox::xls::StylesBuffer::writeCellXfToPropertySet
 
 
 
oox::xls::StylesBuffer::writeFontToProperSet
 
oox::xls::StylesBuffer::writeFontToProperSet
 +
 
oox::xls::StylesBuffer::writeBorderToProperSet
 
oox::xls::StylesBuffer::writeBorderToProperSet
 +
 
oox::xls::Allignment::writeToPropertySet
 
oox::xls::Allignment::writeToPropertySet
 
oox::xls::StylesBuffer::writeFillToPropertySet 4) ScStyleObj::setPropertyValue
 
oox::xls::StylesBuffer::writeFillToPropertySet 4) ScStyleObj::setPropertyValue
 
Calls: 1
 
Calls: 1
 
F+D: 21,475,924
 
F+D: 21,475,924
 +
 
Calls: 14,234
 
Calls: 14,234
 +
 
F+D: 21,419,377
 
F+D: 21,419,377
 +
 
1) ScCellRangesBase::setPropertyValues
 
1) ScCellRangesBase::setPropertyValues
 
2) ScCellRangesBase::setPropertyValue
 
2) ScCellRangesBase::setPropertyValue
3) ScStyleObj::setPropertyValues
+
3) ScStyleObj::setPropertyValues
 +
 
3)oox::xls::OoxStylesFragement::finalizeImport 1) oox::xls::CellStyle::createStyle
 
3)oox::xls::OoxStylesFragement::finalizeImport 1) oox::xls::CellStyle::createStyle
 
 
 
oox::xls::StylesBuffer::writeStylesXfToPropertySet
 
oox::xls::StylesBuffer::writeStylesXfToPropertySet
 +
 
oox::xls::StylesBuffer::writeFontToProperSet
 
oox::xls::StylesBuffer::writeFontToProperSet
 +
 
oox::xls::StylesBuffer::writeBorderToProperSet
 
oox::xls::StylesBuffer::writeBorderToProperSet
 +
 
oox::xls::Allignment::writeToPropertySet
 
oox::xls::Allignment::writeToPropertySet
 
 
oox::xls::StylesBuffer::writeFillToPropertySet 4) ScStyleObj::setPropertyValue
+
oox::xls::StylesBuffer::writeFillToPropertySet
 +
4) ScStyleObj::setPropertyValue
  
  
 
The  oox::xls::CellStyle::createStyle is called 14,234 times, and the F+D: 21,419,377
 
The  oox::xls::CellStyle::createStyle is called 14,234 times, and the F+D: 21,419,377

Revision as of 02:42, 21 September 2012

If there are a lot of cell styles in MS 2007 .xlsx file, when loading the file in Aoo, it will take about 20 seconds to create the cell styles. After analyze the sample file, there are lots of duplicated cell style items in the original file,and such file maybe created by script or other tools. So a method must be used to get rid of the duplicated unused cell styles.

Here is the result data by the rational purify.

Calls: 178,325 F+D: 25,128,429

Calls: 4,268 F+D: 24,404,739

1) ScCellRangesBase::setPropertyValues Calls: 45,336 F+D: 13,999,231

2) ScCellRangesBase::setPropertyValue Calls: 36,334 F+D: 8,745,959

3) ScStyleObj::setPropertyValues Calls: 28,282 F+D: 10,547,312

1)oox::xls::OoxSheetDataContext::onCreatContext 1) oox::xls::OoxSheetDataContext::importRow

oox::xls::WorksheetData::writeXfldRowRangeProperties

oox::xls::StylesBuffer::writeCellXfToPropertySet

oox::xls::StylesBuffer::writeFontToProperSet

oox::xls::StylesBuffer::writeBorderToProperSet

oox::xls::Allignment::writeToPropertySet

oox::xls::StylesBuffer::writeFillToPropertySet

4) ScStyleObj::setPropertyValue Calls: 36,334

F+D: 8,745,959

Calls:178,308

F+D: 5,538,047

Calls: 158,771

F+D: 4,810,522

1) ScCellRangesBase::setPropertyValues

2) ScCellRangesBase::setPropertyValue

3) ScStyleObj::setPropertyValues

2)oox::xls::OoxSheetDataContext::onEndElement 1) oox::xls::WorksheetHelper::setCellFormat

oox::xls::WorksheetData::writeXfldRowRangeProperties

oox::xls::StylesBuffer::writeCellXfToPropertySet

oox::xls::StylesBuffer::writeFontToProperSet

oox::xls::StylesBuffer::writeBorderToProperSet

oox::xls::Allignment::writeToPropertySet oox::xls::StylesBuffer::writeFillToPropertySet 4) ScStyleObj::setPropertyValue Calls: 1 F+D: 21,475,924

Calls: 14,234

F+D: 21,419,377

1) ScCellRangesBase::setPropertyValues 2) ScCellRangesBase::setPropertyValue 3) ScStyleObj::setPropertyValues

3)oox::xls::OoxStylesFragement::finalizeImport 1) oox::xls::CellStyle::createStyle

oox::xls::StylesBuffer::writeStylesXfToPropertySet

oox::xls::StylesBuffer::writeFontToProperSet

oox::xls::StylesBuffer::writeBorderToProperSet

oox::xls::Allignment::writeToPropertySet

oox::xls::StylesBuffer::writeFillToPropertySet 4) ScStyleObj::setPropertyValue


The oox::xls::CellStyle::createStyle is called 14,234 times, and the F+D: 21,419,377

Personal tools