Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak #22

Open
chrisfarms opened this issue Sep 19, 2024 · 2 comments
Open

memory leak #22

chrisfarms opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@chrisfarms
Copy link
Contributor

left open will consume many GB of memory

@ldunnplaymint ldunnplaymint added the bug Something isn't working label Oct 1, 2024
@ldunnplaymint
Copy link
Contributor

We should time box this and needs a kick off with @chrisfarms

Could impact if we offer a "Play again" button or not.

@hypnoshock hypnoshock self-assigned this Oct 14, 2024
@hypnoshock
Copy link
Contributor

I couldn't find a solution but I can list my observations:

  • After playing a round, the parent app process (PlayerchainDemo-dev) was ~1.5gb and the two child window processes were ~1gb
  • After resetting the app, the parent app processes memory usage didn't go down at all however the two child window processes do reset to around 700mb
  • After playing 7 consecutive rounds, the child processes were at around ~1gb the same as the first round however the parent process was 8gb
  • After a clean start, initialising a new chain and waiting on the connection screen, the memory usage of the parent app process would slowly go up if left.
    • curiously the rate in which it goes up varies greatly. I've seen it slowly increase 1mb a minute to suddenly increasing 10mb a second. Not sure if other people playing the game would be affecting this
  • In Peer.init()if I comment out the function that adds the socket listeners, memory usage will not go up over time
  • In Peer._onMessage() if I comment out all handlers then memory usage doesn't go up
  • In Peer._onMessage() if I have the ping/pong handlers uncommented then memory usage WILL go up
  • There was a point where I was suspecting setPeriodic to be causing some trouble but I edited the function to just return early and memory usage still increased over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants