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
Improve RootHandlers #23186
Improve RootHandlers #23186
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23186/4630 |
A new Pull Request was created by @kpedro88 (Kevin Pedro) for master. It involves the following packages: FWCore/Services @cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
(el_location.find("CINTTypedefBuilder::Setup")!= std::string::npos) and | ||
(el_message.find("possible entries are in use!") != std::string::npos))) { | ||
el_severity = SeverityLevel::kInfo; | ||
std::vector<std::string> in_message = { |
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.
This is requiring the construction of this vector each time RootErrorHandlerImpl is called. Move this outside of the function and declare it const
.
Do this for all the std::vector<std::string>
.
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.
In addition, better to change this to const std::vector<const char* const>
since no memory copies would then be needed to create std::string
.
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.
If I use direct list initialization instead of copy list initialization, is it still necessary to use char arrays?
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.
Heck, it might be possible to completely do away with any allocations by using constexpr std::array<const char* const, ...>
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.
To follow the standard, the system has to malloc both the std::vector and all the std::strings each call.
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.
But moving them outside of the function should avoid that, right? Does direct list initialization still entail memory copies?
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23186/4632 |
please test |
The tests are being triggered in jenkins. |
Pull request #23186 was updated. @cmsbuild, @smuzaffar, @Dr15Jones can you please check and sign again. |
Comparison job queued. |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
Comparison is ready Comparison Summary:
|
+1 |
Two changes:
ignoreWarningsWhileDoing()
with any severity level (not justkWarning
).These changes were inspired by issues I found while integrating GeantV with CMSSW.