B
Bern McCarty
We have some large mixed .dlls. The percentage of code that is managed is
small relative to the percentage of native code. We generally want to favor
native callers. But I am struggling with the phenomenon where the mere use
inclusion of headers that contain templates in /CLR compilands seems to result
in methods of template instations ending up getting compiled into IL and
thus penalizing native callers. This is not at all what I want and I'm in
the hunt for a way to make this stop.
I can take a /CLR compiland and aribrarily add an #include <someTemplateHeavyHeader.h>
to it and observe the number of template instantiation methods that are compiled
into IL in my assembly increase dramatically. This seems very odd to me.
Here the compiland clearly doesn't use any information in the header. Afterall
it compiles fine without it. I merely added it to an aribtrary compiland
to see the damage it would cause. Furthermore I included the header file
in a #pragma unmanaged section of the compiland.
Please advise.
I saw googled this but was unable as-of-yet to make the suggested workaround
do any good for me. Maybe I just need more detail on how to do it: http://groups-beta.google.com/group...naged+templates&rnum=1&hl=en#8980ed99bd0a1184
Bern McCarty
Bentley Systems, Inc
small relative to the percentage of native code. We generally want to favor
native callers. But I am struggling with the phenomenon where the mere use
inclusion of headers that contain templates in /CLR compilands seems to result
in methods of template instations ending up getting compiled into IL and
thus penalizing native callers. This is not at all what I want and I'm in
the hunt for a way to make this stop.
I can take a /CLR compiland and aribrarily add an #include <someTemplateHeavyHeader.h>
to it and observe the number of template instantiation methods that are compiled
into IL in my assembly increase dramatically. This seems very odd to me.
Here the compiland clearly doesn't use any information in the header. Afterall
it compiles fine without it. I merely added it to an aribtrary compiland
to see the damage it would cause. Furthermore I included the header file
in a #pragma unmanaged section of the compiland.
Please advise.
I saw googled this but was unable as-of-yet to make the suggested workaround
do any good for me. Maybe I just need more detail on how to do it: http://groups-beta.google.com/group...naged+templates&rnum=1&hl=en#8980ed99bd0a1184
Bern McCarty
Bentley Systems, Inc