Revision 198c0e8...

Go back to digest for 24th February 2013

Optimization in Utilities

Alexander Richardson committed changes in [okteta] /:

Improve build time by not compiling files twice

Since kdelibs requires CMake 2.8.8 since 4.10 we can use the OBJECT
library feature from CMake >= 2.8.8 here. This means the source
files that are used both in the shared library (result) and the static
library (for unit tests) only once.

It saves compiling 113 files again with the exact same settings.

This works with CMake >= 2.8.9 since it needs POSITION_INDEPENDENT_CODE
target property. For CMake 2.8.8 fall back to old behaviour

Also added #include "moc_*.cpp" to all Q_OBJECT derived classes since
apparently it doesn't work otherwise with OBJECT libraries

Time to build kasten/controllers with empty I/O caches before:
real 4m44.111s
user 4m7.949s
sys 0m27.373s

Time to build kasten/controllers with empty I/O caches after:
real 3m9.276s
user 2m41.777s
sys 0m19.293s

~33% percent improvement on my machine.

File Changes

Modified 35 files
  •   kasten/CMakeLists.txt
  •   kasten/controllers/CMakeLists.txt
  •   kasten/controllers/view/poddecoder/poddecodertool.cpp
  •   kasten/controllers/view/poddecoder/poddelegate.cpp
  •   kasten/controllers/view/poddecoder/podtablemodel.cpp
  •   kasten/controllers/view/poddecoder/podtableview.cpp
  •   kasten/controllers/view/structures/modeltest.cpp
  •   kasten/controllers/view/structures/structtool.cpp
  •   kasten/controllers/view/structures/structtreemodel.cpp
  •   kasten/controllers/view/structures/structuresmanager.cpp
  •   kasten/controllers/view/structures/structview.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/abstractvalue8editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/binary8editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/char8editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/float32editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/float64editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/hexadecimal8editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/octal8editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/sint16editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/sint32editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/sint64editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/sint8editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/uint16editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/uint32editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/uint64editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/uint8editor.cpp
  •   kasten/controllers/view/poddecoder/typeeditors/utf8editor.cpp
  •   kasten/controllers/view/structures/datatypes/topleveldatainformation.cpp
  •   kasten/controllers/view/structures/datatypes/topleveldatainformation.h
  •   kasten/controllers/view/structures/script/scriptlogger.cpp
  •   kasten/controllers/view/structures/script/scriptlogger.h
  •   kasten/controllers/view/structures/script/scriptloggerview.cpp
  •   kasten/controllers/view/structures/settings/structureaddremovewidget.cpp
  •   kasten/controllers/view/structures/settings/structuresmanagerview.cpp
  •   kasten/controllers/view/structures/settings/structviewdisplaysettingswidget.cpp
35 files changed in total