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
Validation -- changes for large object passed by value #625
Conversation
… static analyzer cms.ArgSizeChecker
A new Pull Request was created by @gartung (Patrick Gartung) for CMSSW_7_0_X. Validation -- changes for large object passed by value It involves the following packages: Validation/RecoEgamma @rovere, @deguio can you please review it and eventually sign? Thanks. |
int step) { | ||
std::map<DTWireId, std::vector<PSimHit> > simHitsPerWire = _simHitsPerWire; |
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.
I would definitely avoid this kind of shortcuts, since they add basically no gain due to the copy ctr called immediately inside the method. I'd therefore suggest to drop the unnecessary copy (if it is necessary, then it's the const
that has to be dropped) and fix the code inside the method accordingly. I suppose most of the problems could raise from the operator[]
to access elements, since this will naturally break the const attribute. I'd use the at(key)
one, which has a const flavour available. After a quick look at the code, I think this is the best solution.
-1 On Mon, Aug 26, 2013 at 11:58 PM, cmsbuild notifications@github.com wrote:
|
The following categories have been rejected by @rovere: DQM @cms-git-dqm |
Pull request #625 was updated. Signatures reset, please check and sign again. |
Backed out the changes you highlighted. The idea was to avoid the copy constructor in the function call. |
Ciao Patrick, As a small remark, there are identical cases also in pull #602. Thanks, On Tue, Aug 27, 2013 at 10:21 PM, Patrick Gartung
|
Pull request #625 was updated. Signatures reset, please check and sign again. |
I will check pull request #602 as well. I will see how often I used the shortcut of moving the copy into the body of the function on the other branches. |
Hi Patrick, I tested the code and all tests were successful. You are probably aware of the campaign to move the booking of histograms to beginRun() to prevent memory spikes, allow multithreading and multiharvesting. I have noticed that the code books the histogram inside the class constructors. Can we kindly ask you to try to move those books to the beginRun()? Thanks a lot. You can find an example on #762 Thanks. |
On 9/18/2013 9:06 AM, Elias Ron wrote:
|
I'm afraid Patrick has no real ownership of this code and only modified this code as a larger compaign to remove passing large objects by value from the entire CMSSW. |
Apart from Patrick clearly not being the one who should do this changes, we should avoid piling up too much stuff in one single pull request and we should try to get them to converge as quick as possible. If the testing procedures are too cumbersome we should streamline the testing, not pile up work to test at once. |
The following categories have been signed by eron (a.k.a. @eliasron on GitHub): DQM @cms-git-dqm |
Validation -- changes for large object passed by value
prepare for running
found by clang static analyzer cms.ArgSizeChecker
std::map
std::vector