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

Hotfix/issue_183/memory leakage #210

Merged

Conversation

chandeldivyam
Copy link
Contributor

@chandeldivyam chandeldivyam commented Aug 23, 2024

frame_queue is not being consumed anywhere right now. It grew to a very large size which was increasing the memory extremely high. The maximum memory must be dependent on the monitor resolution as the frame size would differ.

This led to a tremendous increase in memory utilization.

We have capped the max queue size and also stopped pushing to the queue. If we want to consume it later, we can again start pushing.

After the changed, tried running .\target\release\screenpipe.exe --ocr-engine windows-native --disable-audio for constantly 1 hour, the memory spike never occurred. I think this could potentially solve #183

Tested it exhaustively on Windows. Need to test it on mac + linux.

How did you test?

  • The mp4 files are being generated, checked it in the .screenpipe\data
  • No Error logs in debug mode

@louis030195
Copy link
Collaborator

@chandeldivyam this is partially solving the issue, there is still memory leak on xcap and screencapture libs and my memory increases forever, let's focus on scap switch now

@louis030195 louis030195 merged commit 90cb99a into mediar-ai:main Aug 24, 2024
3 checks passed
@chandeldivyam
Copy link
Contributor Author

@louis030195 Have we done anything previously? Something where I could start from or we need to start it from scratch?

@chandeldivyam
Copy link
Contributor Author

Also, we should ideally first create a metric / benchmark so that we can measure the current state. And when we release changes how it is moving.

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.

2 participants