Skip to content

made check.h less heavy - #2633

Merged
danmar merged 15 commits into
cppcheck-opensource:masterfrom
firewave:errorlogger
May 23, 2020
Merged

danmar merged 15 commits into
cppcheck-opensource:masterfrom
firewave:errorlogger

Conversation

@firewave

@firewave firewave commented May 8, 2020

Copy link
Copy Markdown
Collaborator

Before:

Compilation (339 times):
  Parsing (frontend):          761.2 s
  Codegen & opts (backend):    123.9 s
...
131637 ms: /mnt/s/GitHub/cppcheck-fw/lib/check.h (included 74 times, avg 1778 ms), included via:

analyze_old.log

After:

Compilation (339 times):
  Parsing (frontend):          742.3 s
  Codegen & opts (backend):    120.6 s
...
35794 ms: /mnt/s/GitHub/cppcheck-fw/lib/check.h (included 74 times, avg 483 ms), included via:

analyze_new.log

Tested with a debug build using Clang 10 on WSL Kali.

@firewave

Copy link
Copy Markdown
Collaborator Author

The changes do not seem to have as much effect on the build times as I had hoped. But that's because a release build with the matchcompiler blows up some of the source files considerately causing the hot spots to be elsewhere.

Also the build times are quite erratic (in the CI and even locally) so it's not easy to compare them just by looking at the total time.

@danmar

danmar commented May 12, 2020

Copy link
Copy Markdown
Collaborator

But that's because a release build with the matchcompiler blows up some of the source files considerately causing the hot spots to be elsewhere.

feel free to compare the debug build times when match compiler is not used. That is how I typically build.

The donate-cpu client might build cppcheck several times a day but I have the feeling it's a very low percentage of the time.

@firewave

Copy link
Copy Markdown
Collaborator Author

feel free to compare the debug build times when match compiler is not used. That is how I typically build.

The donate-cpu client might build cppcheck several times a day but I have the feeling it's a very low percentage of the time.

I am more concerned about the CI build times. The Appveyor times are ridiculous since the old Visual Studio compiler is just so damn slow. Just take a look at the last builds - it took more than a whole day for it to catch up with the current state.

@danmar

danmar commented May 13, 2020

Copy link
Copy Markdown
Collaborator

I am more concerned about the CI build times. The Appveyor times are ridiculous since the old Visual Studio compiler is just so damn slow. Just take a look at the last builds - it took more than a whole day for it to catch up with the current state.

Yes that is a real problem. In general I think CI should finish in 10 or 20 minutes. We are far from that.

@firewave

Copy link
Copy Markdown
Collaborator Author

I am more concerned about the CI build times. The Appveyor times are ridiculous since the old Visual Studio compiler is just so damn slow. Just take a look at the last builds - it took more than a whole day for it to catch up with the current state.

Yes that is a real problem. In general I think CI should finish in 10 or 20 minutes. We are far from that.

Since appveyor is missing individual timing for the various steps it's hard to tell where to look. Also as seen in the past few days the timing is all over the place with builds ranging from 15 minutes to 45 minutes. I guess it depends on the overall load of the service.

But less includes and less CPU time spent is definitely better.

firewave added 5 commits May 20, 2020 08:34
# Conflicts:
#	Makefile
#	gui/checkthread.cpp
#	lib/cppcheck.cpp
#	lib/errorlogger.cpp
#	lib/errorlogger.h
#	lib/tokenize.cpp
#	lib/utils.h
@firewave
firewave marked this pull request as ready for review May 22, 2020 08:32
@firewave

Copy link
Copy Markdown
Collaborator Author

Feel free to merge if this is okay.

@danmar

danmar commented May 22, 2020

Copy link
Copy Markdown
Collaborator

ok.. I think this is fine to merge also.. I just merge a CMake fix also and got a conflict.

# Conflicts:
#	tools/CMakeLists.txt
@firewave

Copy link
Copy Markdown
Collaborator Author

Failure is caused by GitHub server issues.

@danmar
danmar merged commit 37bc048 into cppcheck-opensource:master May 23, 2020
@firewave
firewave deleted the errorlogger branch May 23, 2020 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants