Revision ee83b45...

Go back to digest for 28th July 2013

Optimization in Office

Friedrich W. H. Kossebau committed changes in [calligra] /:

Turn some sequences of x += ... statements (with x a QString) into a long chain of additions (for QStringBuilder)

The power of QStringBuilder only sets in if more than two strings are concatenated
before picking up the result as QString again (e.g. when assigning to a QString variable).
There are some code parts where a lot of concatenating is done, but not in one expression,
instead assigning the intermediate result to a QString var again and again, thus preventing
the advantage of QStringBuilder.

There are also a few places in the code where literal strings are concatenated using "+",
instead of having the compiler concatenate them already.

Patch optimizes the code in those two cases: by removing "+" between literal string and
turning sequences of += into a chain of +

REVIEW: 111595

thanks boud for review

File Changes

Modified 42 files
  •   sheets/Condition.cpp
  •   sheets/Currency.cpp
  •   sheets/FunctionDescription.cpp
  •   sheets/GenValidationStyle.cpp
  •   sheets/Sheet.cpp
  •   sheets/Util.cpp
  •   sheets/ValueFormatter.cpp
  •   filters/libmso/shapes2.cpp
  •   filters/libmsooxml/ComplexShapeHandler.cpp
  •   filters/libmsooxml/MsooXmlVmlReaderImpl.h
  •   kexi/kexiutils/identifier.cpp
  •   libs/db/connection.cpp
  •   libs/db/cursor.cpp
  •   libs/db/expression.cpp
  •   libs/db/fieldlist.cpp
  •   libs/db/preparedstatement.cpp
  •   libs/db/queryschema.cpp
  •   libs/db/utils.cpp
  •   libs/main/KoDocumentEntry.cpp
  •   libs/main/KoFilterManager.cpp
  •   libs/main/KoRecentDocumentsPane.cpp
  •   libs/main/PriorityQueue_p.h
  •   libs/odf/KoStyleStack.cpp
  •   libs/odf/KoXmlStreamReader.cpp
  •   libs/pigment/KoColorConversionSystem.cpp
  •   sheets/dialogs/DatabaseDialog.cpp
  •   sheets/dialogs/FormulaDialog.cpp
  •   sheets/dialogs/ListDialog.cpp
  •   filters/karbon/eps/EpsImport.cpp
  •   filters/karbon/karbon1.x/Karbon1xImport.cpp
  •   filters/karbon/wmf/WmfImportParser.cpp
  •   filters/sheets/applixspread/applixspreadimport.cc
  •   filters/sheets/csv/csvexport.cc
  •   filters/sheets/dbase/dbaseimport.cc
  •   filters/sheets/html/htmlexport.cc
  •   filters/stage/kpr2odf/Filterkpr2odf.cpp
  •   kexi/migration/pqxx/pqxxmigrate.cpp
  •   libs/flake/svg/SvgCssHelper.cpp
  •   libs/koreport/renderer/KoReportHTMLCSSRenderer.cpp
  •   libs/koreport/renderer/KoReportHTMLTableRenderer.cpp
  •   libs/koreport/renderer/KoReportKSpreadRenderer.cpp
  •   libs/vectorimage/libwmf/qwmf.cc
42 files changed in total