Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Performance hit on WPF when it calls Jscript code which calls GarbageCollect()

$
0
0

Hi There,

I have function written in c#, Here are the pseudo code

DoEvaluate()

{

JScript.Evaluate();

}

Inside JScrit Evaluate()

{

CollectGarbage();// this is to release file pointer

}

I call this DoEvaluation() function inside win form application, it takes about 12 seconds, but the same exactly call and logic in WPF, it takes 50 seconds. Big, Big difference.

I use DotTrace to profile the 2 application (Win Form and WPF), it points to CollectGarbage() that takes different time to accomplish it.

My question is how I fix it so that they will be the same efficient in WPF as in WinForms.

Thanks

Gordon


Gordon Senior Software Developper


Viewing all articles
Browse latest Browse all 18858

Trending Articles