-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Reduce/improve includes usage in ROOT header files #5535
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
Changes from all commits
dc57d84
8b46297
134d8cc
fdb1994
14b12ba
07c7207
cfc14de
129d913
ec0f5e7
7af8987
ab789d4
a361721
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,8 +23,6 @@ | |
|
|
||
| #include "Riostream.h" | ||
|
|
||
| #include "TClass.h" | ||
|
|
||
| #include "TObject.h" | ||
|
|
||
| #include "TCollection.h" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,8 +26,8 @@ | |
| ////////////////////////////////////////////////////////////////////////// | ||
|
|
||
| #include "TDirectory.h" | ||
| #include "TList.h" | ||
| #include "RConfigure.h" | ||
| // #include "TList.h" // included in TDirectory.h | ||
| // #include "RConfigure.h" // included via Rtypes.h | ||
|
|
||
| #include <atomic> | ||
| #include <string> | ||
|
|
@@ -55,6 +55,7 @@ class TListOfDataMembers; | |
| class TListOfEnums; | ||
| class TListOfFunctions; | ||
| class TListOfFunctionTemplates; | ||
| class TSeqCollection; | ||
| class TFunctionTemplate; | ||
| class TGlobalMappedFunction; | ||
|
|
||
|
|
@@ -270,8 +271,8 @@ friend TROOT *ROOT::Internal::GetROOT2(); | |
| TObject *GetGeometry(const char *name) const; | ||
| const TObject *GetSelectedPrimitive() const { return fPrimitive; } | ||
| TVirtualPad *GetSelectedPad() const { return fSelectPad; } | ||
| Int_t GetNclasses() const { return fClasses->GetSize(); } | ||
| Int_t GetNtypes() const { return fTypes->GetSize(); } | ||
| Int_t GetNclasses() const; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why make that change?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. This illustrate a trade off: small speedup at parsing time (removing the the include of TList.h for the (rare?) file that uses TROOT but not TList) vs a small performance increase (for the code that uses GetNclasses and GetNtypes). Whether one is better than the other is .. well .. hard to know (and in probably in both case the actual performance change is likely indistinguishable) .. I would probably not have made that change but reverting it is also probably not worth it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pcanal Should I revert these changes in TROOT.h?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Up to you in the end. I slightly lean for revert but not if it is too much hassle.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to keep changes. These methods are not crucial for performance. |
||
| Int_t GetNtypes() const; | ||
| TFolder *GetRootFolder() const { return fRootFolder; } | ||
| TProcessUUID *GetUUIDs() const { return fUUIDs; } | ||
| const TString &GetWebDisplay() const { return fWebDisplay; } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,8 +26,6 @@ | |
|
|
||
| #include "TObject.h" | ||
| #include "TString.h" | ||
| #include "TMap.h" | ||
|
|
||
|
|
||
| class THashList; | ||
| class TMap; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,8 +24,6 @@ | |
|
|
||
| #include "TObject.h" | ||
|
|
||
| #include <memory> | ||
|
|
||
| class TVirtualMutex; | ||
|
|
||
| // Global mutex set in TThread::Init | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
|
|
||
| #include "TVirtualMutex.h" | ||
|
|
||
| #include <memory> | ||
|
|
||
| namespace ROOT { | ||
|
|
||
|
|
||
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 it is just directly here, so we ought to keep it.
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.
See TDirectory.h - "TList.h" included only without
R__LESS_INCLUDES. Means in the dev buildTListis just forward declarations. I just want to avoid same construct here.