You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As seen in cms-sw/cmssw#47470 in some circumstances calling TClass::GetClass may lead to an unnecessary/unwanted loading of the header files.
Reproducer
In the example, there is a lookup for vector<edm::Ref<vector<l1t::TkElectron>,l1t::TkElectron,edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> > >
which, because it is a normalized class name lead to a code path where we do
auloading the library needed for this class and it dependencies
attempt to normalize the name and resolve potential typedefs
check for the dictionary.
However in this case edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> > is intentionally not known to core/meta/TClass and thus the name normalization must check if it is a typedef and this step triggers the (auto) parsing of the headers (for l1t::TkElectron).
This can be solved by executing between 1 and 2:
1a. check for dictionary with the name as is.
ROOT version
at least 6.32 up to master (probably more)
Installation method
any
Operating system
any
Additional context
No response
The text was updated successfully, but these errors were encountered:
If a library was loaded, the alias for a class were also loaded and a non normalized name might lead to a match.
If we skip this check, then the next step will normalized the name and check for typedef inside the name (if
it is a template instance name) and if the name are not found as is, it may lead to loading the header file.
ie. this fixesroot-project#17992 and cms-sw/cmssw#47470
Check duplicate issues.
Description
As seen in cms-sw/cmssw#47470 in some circumstances calling
TClass::GetClass
may lead to an unnecessary/unwanted loading of the header files.Reproducer
In the example, there is a lookup for
vector<edm::Ref<vector<l1t::TkElectron>,l1t::TkElectron,edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> > >
which, because it is a normalized class name lead to a code path where we do
However in this case
edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> >
is intentionally not known to core/meta/TClass and thus the name normalization must check if it is a typedef and this step triggers the (auto) parsing of the headers (forl1t::TkElectron
).This can be solved by executing between 1 and 2:
1a. check for dictionary with the name as is.
ROOT version
at least 6.32 up to master (probably more)
Installation method
any
Operating system
any
Additional context
No response
The text was updated successfully, but these errors were encountered: