Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. how to reduce CPU usage of WPF application?

how to reduce CPU usage of WPF application?

Scheduled Pinned Locked Moved WPF
csharpperformancevisual-studiowpfdata-structures
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CooperWu
    wrote on last edited by
    #1

    My WPF application used high CPU usage after about 30 minutes, then i break the application to find out what code spent high CPU usage, but i got nothing. Visual Studio 2008 can't display current running code, but i found this in "Call Stack" panel: [In a sleep, wait, or join] mscorlib.dll!System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) + 0x8f bytes System.dll!System.Net.TimerThread.ThreadProc() + 0x2f9 bytes mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x66 bytes mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes what's this? what's matter with high CPU usage? and how to reduce the CPU usage? PS: I used Performance Profiling for WPF tool to found out which events or element take high CPU usage, then we found: Tick(TimeManager.Tick()) was take about 40% CPU usage of app. which events will call TimeManager.Tick? how to reduce it? – Cooper.Wu 5 secs ago

    Glad to discuss with you and best wishes.

    S 1 Reply Last reply
    0
    • C CooperWu

      My WPF application used high CPU usage after about 30 minutes, then i break the application to find out what code spent high CPU usage, but i got nothing. Visual Studio 2008 can't display current running code, but i found this in "Call Stack" panel: [In a sleep, wait, or join] mscorlib.dll!System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) + 0x8f bytes System.dll!System.Net.TimerThread.ThreadProc() + 0x2f9 bytes mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x66 bytes mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes what's this? what's matter with high CPU usage? and how to reduce the CPU usage? PS: I used Performance Profiling for WPF tool to found out which events or element take high CPU usage, then we found: Tick(TimeManager.Tick()) was take about 40% CPU usage of app. which events will call TimeManager.Tick? how to reduce it? – Cooper.Wu 5 secs ago

      Glad to discuss with you and best wishes.

      S Offline
      S Offline
      sivaddrahcir
      wrote on last edited by
      #2

      TimeManager is part of the framework and it is related to the animation subsystem. Do you have a lot of animations going on in your app?

      Blog: http://windowsclientdevelopment.spaces.live.com FAQs: http://windowspresentationfoundation.wikispaces.com http://windowsmobile.wikispaces.com http://vsto.wikispaces.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups