Application slows down after running for hours
-
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!
-
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!
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
-
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!