2

I have a serious problem that Outline Text takes lots of CPU Usage.

I take OutlineText Control source in http://blogs.msdn.com/b/wpfsdk/archive/2006/12/24/using-text-as-a-decorative-graphic.aspx and in onTimer() I update OutlineText's Foreground per 100ms but it takes much more CPU than TextBlock.

Cause I think it refers to image processing inside it.

How can I improve the source code or is there any other way to implement Outline Text in WPF?

LarsTech
  • 80,625
  • 14
  • 153
  • 225
AdamWorld
  • 31
  • 4

2 Answers2

1

I find the best thing to do in situations like this, where your code is slow but you dont know why is to use a profiler, http://www.quest.com/jprobe/software_download.aspx you can get a free trail of this java profiler and it will tell you line by line how much time is spent and how many times it is executed, you should be able to pinpoint exactly what is slowing you code down with this.

Hope this helps, Eamonn

Eamonn McEvoy
  • 8,876
  • 14
  • 53
  • 83
1

Rendering Time And CPU usage problems are successfully resolved by freezing outline text's individual object. you can get correct answer in http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/512a88a3-1285-4c79-9f41-95e6dc5d097d?prof=required I wish this will help you to implement OutlineText in WPF. Thank you.

AdamWorld
  • 31
  • 4