Subject: TRACE very slow in /clr enabled MFC projects

  • Thread starter Thread starter WJ
  • Start date Start date
W

WJ

I have enabled the /clr options in some legacy MFC projects (because I needed
to use the .NET features). The TRACE macro are running VERY slow comparing
the the old versions (that have no /clr turned on).

Is there a work around for this? Thanks.

WJ
 
WJ said:
I have enabled the /clr options in some legacy MFC projects (because
I needed to use the .NET features). The TRACE macro are running VERY
slow comparing the the old versions (that have no /clr turned on).

Is there a work around for this? Thanks.

Use TRACE in the unmanaged code, System::Diagnostics::Trace::WriteLine in
the managed code, and #pragma managed to make sure you know where the
managed/unmanaged transitions are.

Otherwise every use of TRACE would force at least one managed/unmanaged
transition, maybe more.
 
Back
Top