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. C / C++ / MFC
  4. Application slows down after running for hours

Application slows down after running for hours

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelp
3 Posts 3 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.
  • I Offline
    I Offline
    Indrawati
    wrote on last edited by
    #1

    I have a video processing application that takes input for a web camera, do something on each frame, and immediately display the result. The application runs quite well in the beginning, with frame rate reaching up to 20fps. The problem is, it seems that the application slows down after it has run for a long time (something in the range of 15 hours or so). At this time, the frame rate is only 4 fps or so. I know it is impossible for someone to pinpoint what the problem exactly is, what I want to know is what are the possible causes for this. I have been scratching my head for the past few hours and the solution still eludes me. Some information about my application that may be useful: 1. My app is a directshow filter 2. There is no harddisk access involved, as my app only process input frames (obtained from a webcam) and immediately display them on screen 3. I didn't detect any memory leaks, when my app's performance dropped to 4fps, it is only consuming around 10% of the available memory 4. After the performance dropped to 4fps, sometimes the fps count can increase again up to ~8fps, but it never reaches the original fps count (20 fps) 5. I have tested the app on several PCs with different configurations, and all of them exhibit the same behaviour Thanks!

    2 J 2 Replies Last reply
    0
    • I Indrawati

      I have a video processing application that takes input for a web camera, do something on each frame, and immediately display the result. The application runs quite well in the beginning, with frame rate reaching up to 20fps. The problem is, it seems that the application slows down after it has run for a long time (something in the range of 15 hours or so). At this time, the frame rate is only 4 fps or so. I know it is impossible for someone to pinpoint what the problem exactly is, what I want to know is what are the possible causes for this. I have been scratching my head for the past few hours and the solution still eludes me. Some information about my application that may be useful: 1. My app is a directshow filter 2. There is no harddisk access involved, as my app only process input frames (obtained from a webcam) and immediately display them on screen 3. I didn't detect any memory leaks, when my app's performance dropped to 4fps, it is only consuming around 10% of the available memory 4. After the performance dropped to 4fps, sometimes the fps count can increase again up to ~8fps, but it never reaches the original fps count (20 fps) 5. I have tested the app on several PCs with different configurations, and all of them exhibit the same behaviour Thanks!

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      3. I didn't detect any memory leaks, when my app's performance dropped to 4fps, it is only consuming around 10% of the available memory. Two ideas come to my mind:

      • Could it be a memory fragmentation issue? Do you happen to heavily allocate and free memory for each frame? If so, maybe you can try redesigning your stuff so that memory is reused instead, or something along that direction.
      • Maybe you're running out of GDI resources?

      HTH Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      1 Reply Last reply
      0
      • I Indrawati

        I have a video processing application that takes input for a web camera, do something on each frame, and immediately display the result. The application runs quite well in the beginning, with frame rate reaching up to 20fps. The problem is, it seems that the application slows down after it has run for a long time (something in the range of 15 hours or so). At this time, the frame rate is only 4 fps or so. I know it is impossible for someone to pinpoint what the problem exactly is, what I want to know is what are the possible causes for this. I have been scratching my head for the past few hours and the solution still eludes me. Some information about my application that may be useful: 1. My app is a directshow filter 2. There is no harddisk access involved, as my app only process input frames (obtained from a webcam) and immediately display them on screen 3. I didn't detect any memory leaks, when my app's performance dropped to 4fps, it is only consuming around 10% of the available memory 4. After the performance dropped to 4fps, sometimes the fps count can increase again up to ~8fps, but it never reaches the original fps count (20 fps) 5. I have tested the app on several PCs with different configurations, and all of them exhibit the same behaviour Thanks!

        2 Offline
        2 Offline
        224917
        wrote on last edited by
        #3

        Indrawati wrote :3. I didn't detect any memory leaks, Check for other leaks also, different handles like registry, files, thread etc, etc ....
        There is no spoon. mail

        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