From 2ccdfeb9e1adb4830e9b8ead18781efe17cd69f8 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther Date: Wed, 5 Jun 2019 18:19:08 +0200 Subject: [PATCH] Gold linker, CCache, Stats, LGTM - Increases linker performance under Linux builds by using Gold linker, if available - ccache is used if available - removed statistic class (Stats.cpp) from project due to the missing result (sorry @Brindosch) - add LGTM bandges for code analysis overview Signed-off-by: Paulchen-Panther --- CMakeLists.txt | 12 +- README.md | 2 + .../network_bridge/udpraw_serialadalight.py | 1 - assets/webconfig/content/about.html | 2 +- assets/webconfig/content/update.html | 3 +- assets/webconfig/js/content_colors.js | 22 +-- assets/webconfig/js/content_dashboard.js | 121 ++++++------- assets/webconfig/js/content_effects.js | 38 ++-- .../js/content_effectsconfigurator.js | 20 +-- assets/webconfig/js/content_general.js | 12 +- assets/webconfig/js/content_grabber.js | 24 +-- assets/webconfig/js/content_index.js | 62 +++---- assets/webconfig/js/content_leds.js | 136 +++++++-------- assets/webconfig/js/content_logging.js | 50 +++--- assets/webconfig/js/content_network.js | 29 ++-- assets/webconfig/js/content_remote.js | 81 +++++---- assets/webconfig/js/content_webconfig.js | 8 +- assets/webconfig/js/hyperion.js | 142 ++++++++------- assets/webconfig/js/ledsim.js | 41 ++--- assets/webconfig/js/settings.js | 12 +- assets/webconfig/js/ui_utils.js | 33 ++-- assets/webconfig/js/wizard.js | 44 ++--- cmake/LDGold.cmake | 2 +- .../build/tinkerforge/ip_connection.c | 12 +- effects/gif.py | 2 +- effects/knight-rider.py | 2 +- effects/pacman.py | 2 +- effects/running_dots.py | 2 +- effects/swirl.py | 2 +- effects/waves.py | 2 +- effects/x-mas.py | 2 +- include/api/JsonAPI.h | 2 +- include/effectengine/EffectEngine.h | 4 +- include/effectengine/EffectFileHandler.h | 4 +- include/grabber/QtGrabber.h | 2 +- include/hyperion/Grabber.h | 4 +- include/hyperion/Hyperion.h | 12 +- include/hyperion/ImageToLedsMap.h | 8 +- include/hyperion/PriorityMuxer.h | 8 +- include/hyperion/SettingsManager.h | 2 +- include/leddevice/LedDevice.h | 2 +- include/ssdp/SSDPServer.h | 2 +- include/utils/Image.h | 4 +- include/utils/Logger.h | 2 +- include/utils/NetUtils.h | 2 +- include/utils/Stats.h | 45 ----- include/webserver/WebServer.h | 2 +- libsrc/api/JsonAPI.cpp | 3 +- libsrc/bonjour/bonjourserviceregister.cpp | 2 +- libsrc/effectengine/EffectEngine.cpp | 4 +- libsrc/effectengine/EffectFileHandler.cpp | 4 +- libsrc/flatbufserver/FlatBufferClient.cpp | 6 +- libsrc/grabber/qt/QtGrabber.cpp | 4 +- libsrc/grabber/x11/X11Grabber.cpp | 2 +- libsrc/hyperion/Grabber.cpp | 4 +- libsrc/hyperion/GrabberWrapper.cpp | 2 +- libsrc/hyperion/Hyperion.cpp | 16 +- libsrc/hyperion/ImageToLedsMap.cpp | 2 +- libsrc/hyperion/PriorityMuxer.cpp | 8 +- libsrc/hyperion/SettingsManager.cpp | 2 +- libsrc/leddevice/dev_net/ProviderUdp.cpp | 2 +- libsrc/ssdp/SSDPServer.cpp | 2 +- libsrc/utils/Logger.cpp | 2 +- libsrc/utils/Stats.cpp | 164 ------------------ libsrc/webserver/QtHttpServer.h | 2 +- libsrc/webserver/StaticFileServing.cpp | 2 +- src/hyperion-framebuffer/FramebufferWrapper.h | 1 + src/hyperion-v4l2/ScreenshotHandler.h | 2 + src/hyperion-x11/X11Wrapper.h | 1 + src/hyperiond/hyperiond.cpp | 15 +- src/hyperiond/hyperiond.h | 2 - 71 files changed, 532 insertions(+), 750 deletions(-) delete mode 100644 include/utils/Stats.h delete mode 100644 libsrc/utils/Stats.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 20bc1971..f9fb1bea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,13 @@ IF ( POLICY CMP0026 ) CMAKE_POLICY( SET CMP0026 OLD ) ENDIF() +# Configure CCache if available +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) +endif(CCACHE_FOUND) + SET ( HYPERION_VERSION_STABLE OFF ) SET ( HYPERION_VERSION_MAJOR 2 ) SET ( HYPERION_VERSION_MINOR 0 ) @@ -201,9 +208,6 @@ IF ( ${CHECK_CONFIG_FAILED} ) MESSAGE (FATAL_ERROR "check of json default config failed" ) ENDIF () - -# Createt the configuration file - # Add project specific cmake modules (find, etc) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) @@ -214,7 +218,6 @@ find_package(GitVersion) configure_file("${PROJECT_SOURCE_DIR}/HyperionConfig.h.in" "${PROJECT_BINARY_DIR}/HyperionConfig.h") include_directories("${PROJECT_BINARY_DIR}") - # Define the global output path of binaries SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) @@ -265,7 +268,6 @@ IF ( "${Qt5Core_VERSION}" VERSION_LESS "${QT_MIN_VERSION}" ) message( FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}" ) ENDIF() - # Add libusb and pthreads find_package(libusb-1.0 REQUIRED) find_package(Threads REQUIRED) diff --git a/README.md b/README.md index 794103ff..2dcacdf9 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ + + diff --git a/assets/firmware/arduino/network_bridge/udpraw_serialadalight.py b/assets/firmware/arduino/network_bridge/udpraw_serialadalight.py index 2d49363d..5c6a2dfc 100755 --- a/assets/firmware/arduino/network_bridge/udpraw_serialadalight.py +++ b/assets/firmware/arduino/network_bridge/udpraw_serialadalight.py @@ -20,7 +20,6 @@ import sys import socket import serial import serial.threaded -import time class SerialToNet(serial.threaded.Protocol): diff --git a/assets/webconfig/content/about.html b/assets/webconfig/content/about.html index 03782f95..aaaf8a10 100644 --- a/assets/webconfig/content/about.html +++ b/assets/webconfig/content/about.html @@ -34,7 +34,7 @@ createTable("","atb","about_cont"); for(var i = 0; i