Activity Spikes and Performance Degradation?

I believe that I’m not doing anything like that–in my own code, at least; I don’t know whether Panda itself has any such.

That’s a good idea–it hadn’t occurred to me to check those numbers. (I’d forgotten that PStats offered them. ^^; )

I’ll do that and then edit this post with the results, I think.

(I did look at the node-hierarchy in DirectTools, as I recall–indeed, that’s how I found two very minor cases of nodes not being cleaned up. I didn’t see anything else accumulating–but I may well have missed something.)

It’s quite possible–although I would have thought that I’d at least notice it in the more-intensive parts of the game, or when performance is constrained by things like DirectTools.

[edit]

Okay, I’ve looked at the PStats graphs, and it does look like something is accumulating. :/

Here is what I saw in one experiment, over the course of a few reloads:

  • “Nodes” went from 282 to 288
    • Not a huge increase, but an increase nevertheless
  • “Geoms”, however, held steady at 213
  • “RenderStates” started at 1002, then climbed quickly to 1282, then 1331, then dropped slightly to 1327.
    • Odd that it held so steady at the end, but a significant increase nevertheless
  • “TransformStates” climbed, but only a little, from 2742 to 2777
  • “System memory” was similar, going from 1031 MB to 1135 MB
  • “Vertices”, oddly enough, held rock-steady at 3108 K
  • “State changes” climbed a little, from 228 to 242
  • “PipelineCyclers” rose dramatically, starting at 44001 and rising to 62832! 0_0
  • “Vertex Data (MB)” rose initially from 162 MB to 211 MB, then held steady there
  • “Graphics memory (MB)” was similar, rising initially from 702 MB to 777 MB, then holding there.
  • “Geom cache size” rose from 502 to 573.

So, it seems that something is leaking, somewhere. :/

The question now is: what?

Looking at the data, there might be some models going un-cleaned-up, but it doesn’t look like a lot. If anything, I’m tempted to think that it’s more likely “logical” objects than graphical ones (that is, things like “GameObject” classes, etc.

On the other hand, what is “PipelineCyclers”, and why is it rising so much more than anything else?

Regarding the graphical/scene-graph side, is there some reasonably-easy way to find nodes that aren’t being cleaned up? Or is it just a matter of combing through my code for anything that might have been missed…?

[edit 2]
Some of the answers in this thread seem to be proving useful in finding leaked objects! :slight_smile:

(Spoiler: it looks like, amongst other things, I have some DirectGUI objects going un-cleaned-up… Those might be a pain to track down and fix! >_<)

However, a call to “MemoryUsage.getPointers(mup)” is crashing due to an AssertionError, despite my having “track-memory-usage 1” in my PRC file… :/