templates in mixed compilands in VC 7.1

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
 
G

Gary Chang[MSFT]

Hi Bern,

Currently I am consulting this issus with our VC experts, if we have any
workaround regarding this, I will update you as soon as possible.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Gary Chang[MSFT]

Hi Bern,

By now I haven't found a practical solution on this issue, it appears we
need to contact a PSS support engineer to work on this problem.

So would you please tell me do you still monitor this issue?


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Bern McCarty

Oh yes. I am very eager to find some way to control/work-around this problem.
For the moment I've written a little Python program that processes ildasm
output just to produce the list of global functions compiled into IL. I
check the results into our source so that we can track how this is changing.

But I really need at least a methdology to employ to help pinch this problem
off where I need to. When the mere inclusion of headers makes you go south,
you're in trouble.

Thanks.

-Bern

Hello Gary Chang[MSFT],
 
G

Gary Chang[MSFT]

Hi Bern,

Considering you just contacted our premier support consulant Peter on this
issue, would you please tell me have you already raise a support case with
him? If not I will create one on our side.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Bern McCarty

Peter is waiting on a test case from me and then he'll open a case on it
for me from his side.

Thanks for looking at this.

-Bern

Hello Gary Chang[MSFT],
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top