-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check on compile times #3452
Comments
I compiled things and it only compiled the files that were modified, because of like, idk cache or it checked what changed or something. With AppVeyor it would have taken longer, because it compiles all the files again. |
Yes. The compile times I'm talking about in this issue are compiling everything from scratch, exactly like AppVeyor. Incremental builds are a lot faster. |
I'm compiling a Release version from a branch from scratch now on AppVeyor to see how long it takes there. |
So a later build took 6 min 23 sec until it said "Build success", and another later build took 6 min 46 sec The one I just made took 7 min 28 sec |
I ran right another one after the last one finished and it took 7 min 38 sec though I think the ones from Visual Studio, also without the cache, build quicker, though I could be wrong. Not sure about the hardware on AppVeyor. |
and another one I just ran took 7 min 36 sec |
I'm sure there's a bit of work that could be done on c2's side to improve compile times, but nothing's gonna get you around the specs of a GH runner unless you use a self-hosted one. Might be worth looking into. |
From the duplicate issue:
|
On Windows for MSVC, you can use microsoft/vcperf and the Windows Performance Analyzer (about 700 MiB). Building from CLI
To compile, you need to have git clone https://github.com/microsoft/vcperf.git
cd vcperf
nuget restore
msbuild /property:Configuration=Release The resulting |
I've done a I've taken care to disable ccache: Patch to disable ccachediff --git a/CMakeLists.txt b/CMakeLists.txt
index db82c9ed..d9368b58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,13 +41,13 @@ else()
set(MAJOR_QT_VERSION "5")
endif()
-find_program(CCACHE_PROGRAM ccache)
-find_program(SCCACHE_PROGRAM sccache)
-if (SCCACHE_PROGRAM)
- set(_compiler_launcher ${SCCACHE_PROGRAM})
-elseif (CCACHE_PROGRAM)
- set(_compiler_launcher ${CCACHE_PROGRAM})
-endif ()
+#find_program(CCACHE_PROGRAM ccache)
+#find_program(SCCACHE_PROGRAM sccache)
+#if (SCCACHE_PROGRAM)
+# set(_compiler_launcher ${SCCACHE_PROGRAM})
+#elseif (CCACHE_PROGRAM)
+# set(_compiler_launcher ${CCACHE_PROGRAM})
+#endif ()
# Alternate linker code taken from heavyai/heavydb Results from Debug buildThe CMake build command was:
Results from Release buildCMake command:
|
I edited the PCH to speed up some header-only libraries (debug, no cache; about 4min30s down to 3min45s). Diffdiff --git a/src/PrecompiledHeader.hpp b/src/PrecompiledHeader.hpp
index a4a45395..f6ad33f1 100644
--- a/src/PrecompiledHeader.hpp
+++ b/src/PrecompiledHeader.hpp
@@ -1,8 +1,10 @@
#ifdef __cplusplus
+# include <boost/circular_buffer.hpp>
# include <boost/current_function.hpp>
# include <boost/foreach.hpp>
# include <boost/noncopyable.hpp>
# include <boost/optional.hpp>
+# include <boost/signals2.hpp>
# include <IrcCommand>
# include <IrcConnection>
# include <IrcMessage>
@@ -12,40 +14,29 @@
# include <pajlada/signals/connection.hpp>
# include <pajlada/signals/signal.hpp>
# include <QAbstractListModel>
-# include <QAbstractNativeEventFilter>
# include <QAction>
# include <QApplication>
# include <QBrush>
# include <QBuffer>
-# include <QButtonGroup>
# include <QByteArray>
# include <QCheckBox>
# include <QClipboard>
# include <QColor>
# include <QComboBox>
-# include <QCompleter>
-# include <QCoreApplication>
# include <QDateTime>
# include <QDebug>
# include <QDesktopServices>
# include <QDialog>
# include <QDialogButtonBox>
# include <QDir>
-# include <QDockWidget>
-# include <QDrag>
-# include <QDragEnterEvent>
# include <QElapsedTimer>
-# include <QEventLoop>
# include <QFile>
# include <QFileDialog>
# include <QFileInfo>
# include <QFlags>
# include <QFont>
-# include <QFontDatabase>
-# include <QFontDialog>
# include <QFontMetrics>
# include <QFormLayout>
-# include <QGraphicsBlurEffect>
# include <QGroupBox>
# include <QHBoxLayout>
# include <QHeaderView>
@@ -58,7 +49,6 @@
# include <QKeyEvent>
# include <QLabel>
# include <QLayout>
-# include <QLibrary>
# include <QLineEdit>
# include <QList>
# include <QListView>
@@ -74,7 +64,6 @@
# include <QNetworkReply>
# include <QNetworkRequest>
# include <QObject>
-# include <QPainter>
# include <QPainterPath>
# include <QPaintEvent>
# include <QPalette>
@@ -92,31 +81,17 @@
# include <QSizePolicy>
# include <QSlider>
# include <QSpinBox>
-# include <QStackedLayout>
# include <QStandardPaths>
# include <QString>
# include <QStyle>
# include <QStyleOption>
# include <QTabWidget>
-# include <QtCore/QVariant>
# include <QTextEdit>
# include <QtGlobal>
# include <QThread>
# include <QThreadPool>
# include <QTime>
# include <QTimer>
-# include <QtWidgets/QApplication>
-# include <QtWidgets/QButtonGroup>
-# include <QtWidgets/QDialog>
-# include <QtWidgets/QDialogButtonBox>
-# include <QtWidgets/QFormLayout>
-# include <QtWidgets/QHBoxLayout>
-# include <QtWidgets/QHeaderView>
-# include <QtWidgets/QLabel>
-# include <QtWidgets/QLineEdit>
-# include <QtWidgets/QPushButton>
-# include <QtWidgets/QTabWidget>
-# include <QtWidgets/QVBoxLayout>
# include <QUrl>
# include <QUuid>
# include <QVariant> Headers using |
I realize this may not be super helpful but here's a link to an article by one of the Blender devs on common techniques to improve C++ build times: https://devtalk.blender.org/t/speed-up-c-compilation/30508 |
Checklist
Describe your issue
Guys, we've got an issue in the form of compile times. It takes ~7 minutes for CI (which has decent computing power) to compile Chatterino. While I know that C++ itself has long compile times, it probably is possible to shorten them at least a little.
IMO this issue isn't really a bug neither is it an enhancement, it's a problem we have.
Screenshots
n/a
OS and Chatterino Version
Since a long time ago xd
The text was updated successfully, but these errors were encountered: