-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fixed #12516 - added a preliminary tuning guide [skip ci] #6632
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
Conversation
|
I will provide rough write-ups of all the sections (especially just a mind dump) I already listed soon. Along with some related tickets as well as PRs. If you have additional sections to add add a comment and I will incorporate them. |
|
Content-wise I am done with this for now. So feel free to provide feedback on it. I will still address the TODOs by filing tickets and publishing a few PRs and will mark it ready for review afterwards. |
b1e6bfd to
bb98e61
Compare
|
I cannot be bothered to deal with the TODOs right now...so just let's get it in. |
|
@chrchr-github Care for a post-commit review? |
|
|
||
| ### Use Multiple Jobs | ||
|
|
||
| By default only a single process/thread is being used. You might to scale this up using the `-j` CLI option. Please note that specifying a value that will max out your systems resources might have a detrimental effect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can increase this value by passing...
|
|
||
| ### Use A Different Threading Model | ||
|
|
||
| When using multiple job for the analysis (see above) on Linux it will default to using processes. This is done so the analysis is not aborted prematurely aborted in case of a crash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: aborted prematurely aborted
|
|
||
| ## Tuning At Build-Level | ||
|
|
||
| It is most likely that a pre-built binary is being used - either an official one or one provided by the packaging manager of my operating system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of your operating system
Note: I'm not seeing the "Suggest change" icon for some reason.
|
|
||
| ## Reporting Issues | ||
|
|
||
| If you encounter a file which has an unreasonable slow analysis please consider reporting this as an issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unreasonably
|
|
||
| If you encounter a file which has an unreasonable slow analysis please consider reporting this as an issue. | ||
|
|
||
| Also consider reporting major upticks in the runtime of the analysis after updating to a newer version. Some of these might be expected as the analysis is constantly improved but out-of-the-box we still need aim for reasonable times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: need aim
| Unfortunately it has overhead because of a suboptimal implementation and the fact that data needs to be transferred from the child processes to the main process. | ||
| So if you do not require the additional safety you might want to switch to the usage of thread instead using `--executor=thread`. | ||
|
|
||
| Note: For Windows binaries we currently do not provide the possibility of using processes so this does not apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Windows binaries always use threads, so this does not apply.
|
|
||
| ### Specify A Build Dir | ||
|
|
||
| Using the `--cppcheck-build-dir` allows you to perform incremental runs which omit files which have not been changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably mention the need to combine -j with --cppcheck-build-dir for certain checks (unusedFunction?)
| If your code base contains files which rarely change (e.g. local copies of external dependencies) or you have generated files (e.g. `moc_*.cpp` for Qt projects) you might consider excluding these from the analysis. | ||
| This can be done by using the `-i` option on the CLI, `<ignore>` in GUI projects or by including them to begin with into the files passed to the analysis. | ||
|
|
||
| Depending on your setup you might also consider to scan these files in a less frequent run (e.g. only when the files have changed or Cppcheck was updated). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files less often (...)
No description provided.