mardi 24 juin 2014

WPF performance problems with PresentationTraceSources


Vote count:

0




We're registering a trace listener to capture binding errors in our WPF application. This works great when the application is started with debugger attached, the WPF trace events are then automatically activated.


When running outside the debugger, the trace events must be manually enabled with the following line:



PresentationTraceSources.Refresh();


This works so far that we do get the binding error trace events. However, we also observe performance issues, for example when switching tabs repeatedly; the tab switch gets slower with every switch. With an attached debugger or when disabling the binding error trace events by commenting the above statement, the performance issues are gone. Funny thing is, that the tab switch itself does not produce any additional binding errors.


Do you have any idea what the difference between binding error trace events with attached debugger and binding error trace events with PresentationTraceSources.Refresh() might be?



asked 32 secs ago

theDmi

1,282





Aucun commentaire:

Enregistrer un commentaire