mazurwiktor / albion-online-stats

Albion online stats is an extension to MMORPG game - Albion Online. It tracks network traffic and displays various statistics, such as damage and DPS meter calculated from in-game actions.
Apache License 2.0
196 stars 64 forks source link

[BUG] Memory Leak(s) as the longer AOS is on #24

Open donovanly opened 4 years ago

donovanly commented 4 years ago

Describe the bug When you first open AOS, it runs perfectly fine and smooth. However, the longer the application runs the slowly the application becomes. It becomes slow to the point of not being able to properly drag the application across the desktop.

Log file

backend - Copy.log

To Reproduce Steps to reproduce the behavior:

  1. Start application
  2. Run through a dungeon, or two, and at this point you may notice slowdown

Expected behavior AOS should not slow down the longer the application stays on.

Screenshots N/A

Desktop (please complete the following information):

donovanly commented 4 years ago

To provide additional context, I've ran AOS for approximately 2 hours and the RAM usage went from 30MB (on initial start) to roughly 110MB.

Additionally, CPU usage scales upwards as well from ~2% to 10% running on a i7-7700k CPU @4.20GHz

mazurwiktor commented 4 years ago

@donovanly first of all, thanks for the bug report!

I wonder how to approach this issue which, by the way, I was aware of ^.^

Let me explain.

As application is running it builds up player base, each new player is an object which isn't deleted because you can not be sure if you won't add this player to the party.

We can clean up cached players which for example did not dealt any damage. As i wrote this message I wanted to give an example where this break something but actually now when I'm thinking about it I don't see any problems with it.

Yeah, cached players with no damage can be cleared up when you change the zone, this way memory usage should be more-less constant. With less player objects there should also be no problems with CPU since iterating through them is most CPU consuming task.

Thanks! I'll add it in next iteration.

donovanly commented 4 years ago

Thanks for the latest release. I'll keep a lookout on how performance feels soon and will update this ticket.

GuillaumeFavelier commented 4 years ago

Any update on this?

SirChewie commented 3 years ago

I am able to increase the memory the application takes up by consistently clicking the trashcan icon. Are you logging the clear command?

mazurwiktor commented 3 years ago

I am able to increase the memory the application takes up by consistently clicking the trashcan icon. Are you logging the clear command?

It's not logged anywhere. I'm going to look into that.