today I tested the VisualVM Profiler on my current project and was quite suprised by the data it gave me. To understand the results I got I have some questions:
- Watching the heap memory usage (monitor tab) I observed that my programm's used heap memory steadily increases until it hits ~25 MB used the drops to 3-5 MB within seconds and increases again. Is this normal behavior and why does it happen?
- Watching the thread dispatching I noticed something strange: My gameloop is looping permanently with 1 MS sleep delay build in. I've got no other threads and my console output / fps-data suggests that the loop does what it is supposed to do. But the profiler says my loop-thread sleeps ~75% of the time. I think thats quite contradicting. Can someone explain this?
- The profiler says that a thread called "RMI TCP Connection" allocates A LOT (75%) of data. Also the largest amount of data is char ... why?
Thanks in advance!