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

Remove memory leak #266

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Remove memory leak #266

merged 2 commits into from
Nov 7, 2024

Conversation

Gorizory
Copy link
Contributor

@Gorizory Gorizory commented Nov 7, 2024

Found this memory leak when my app was running for a long time.

Copy link
Collaborator

@clins1994 clins1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find. I would like to see how you found it though. Evidence?

@Gorizory
Copy link
Contributor Author

Gorizory commented Nov 7, 2024

@clins1994 well, actually I've found it a while ago, when I was testing my app in prod env. It uses this lib to fetch data from TV and refresh it for about 20k symbols. Usage is something like "Create chart -> get data -> delete chart -> repeat for next symbol".

And while checking CPU usage I noticed that RAM usage is constantly growing. Then I reviewed lib's code and found that there is a memory leak. After fixing it locally I had no issues with RAM.

Found some images with resources usage from that test (like mid-test and at the end):
image
image

@Mathieu2301 Mathieu2301 merged commit 4b66e3d into Mathieu2301:main Nov 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants