Possible BGE performance leak? (not a memory leak)

Because I notice as I change and alter stuff in one of my game demos, that little by little, the performance slowly drops after so many game tests until I quit Blender.

I don’t know the cause, but it’s not a memory leak, I checked and there wasn’t any noticable increase in memory usage between tests. It’s like this, the game runs the fastest when you play it after freshly opening Blender, and then after like 10-20 tests with small changes in between, the max FPS slowly drops. Like I said, I don’t know what would cause it.

could you please look at the profile percentages? look whats the one that grows.

yeah CD, you and me basically have the same PC and I have the same thing. The performance can drop by 1/2 for no real reason. Who knows why really? I’m not a programmer so I haven’t a clue.

then restart or do something else and it’s faster than before

The profile percentages don’t really budge all that much anyway, so I don’t know what the problem is. Maybe Ben2610 or Erwin can look to see what’s causing it.

That is strange…because a couple of times i’ve been working on a game, and i generally get between 40-55 FPS depending on what’s on the screen, but every once and a while, after having it open and working on it for a while, it will randomly jump up to a constant 60 FPS all the time…

aka, the opposite of what you’ve been experiencing.

I’ve experienced the same thing. Though it sometimes fluctuates in speed. I also have another problem, it might have a relation to this.

Lets say I run the game and I go to a character select screen, then I play a level. When I go back to the select screen it doesn’t function properly. If this scene gets restarted a couple of times it can work properly. Its really weird. Again I’m not sure if this has any connection with this problem.
-edit- I guess this has nothing to do with this since I found the problem. Ignore.

I got a performance spike just now, you see I have a demo where I greatly expanded Social’s old FPS template for things like ladders, and when I set the key sensors connected to the ‘walk’ python script to pulse once every 15 frames, the framerate is all of a sudden a bit higher.

Now I’ve tested and this is consistant, every time it pulse rate stays there the performance will spike, After setting the rate to different values, dialing it back to 15 and seeing the performance spike I may as well keep it.

I just found out this only worked with the pulse rate of the logic system seen when you click on the crosshair is set to 30. I’ll be keeping the stuff this way, if it increases performance, then why fix it?

A constant reduction in efficiency would most likely point to improper deletion of data kept in the Virtual Memory; you can check virtual memory usage on Windows by going into your Task Manager (Ctrl-Alt+Del), and from the “View>Select Columns” menu ticking Virtual Memory Size. You will now beable to view the Virtual Memory usage (Commonly known as “Swap Space”) for your programs. And confirm the problem.

A sudden jump in GPU performance, thus your fps, would most likely be due to reducing the active memory being rendered, such as a higher resolution texture dropping outside, or less total vertices inside, the field of projection.

related? bug

https://projects.blender.org/tracker/index.php?func=detail&aid=17858&group_id=9&atid=125

there is a big memory leak when running the engine several times

Your showstopper has been fixed Cyborg_ar
http://lists.blender.org/pipermail/bf-blender-cvs/2008-October/016311.html

I don’t know whether that was responsible for the performance leak, but this is good we have someone like Benoit maintaining the BGE.