-
Notifications
You must be signed in to change notification settings - Fork 24
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
sensors-logging: Refactor to reduce memory usage and allow individual video subtitles #1637
base: master
Are you sure you want to change the base?
sensors-logging: Refactor to reduce memory usage and allow individual video subtitles #1637
Conversation
The old pipeline was saving the entire log in memory, which was severely affecting the application's performance. With this new approach, there's no more logs in memory. All log points are saved in the local database, and retrieved when the request to generate the log file is made. I took the opportunity of this refactor to also address the problem of multiple log requesters interfering with each other. Now the system will not stop logging while there's an active log requester.
Aware it's potentially out of scope, but would it make sense to include some of the #776 changes here? That PR never got merged, and I think would likely need some rework to apply to the current codebase, but basic stuff like using loops for the largely repeated content of the subtitle lines seems like a good idea to reduce future maintenance load... |
I think it's out of scope. There were changes on that part of the code after the mentioned PR and they are unrelated to this patch. Current patch fixes a open bug, while the other is a code improvement (that was actually adding bugs, as commented there). |
Does the branch name, in this case, means something to the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Yes. The way that it is right now, if you have to records running, and stop one of them, all of the sensor logs stop, and you won't have sensors logs for the rest of the second recording. With this patch, the logs stay running until there are no recordings left. Can you check if it's working as it should for you as well? This is an important feature, so I don't want to risk breaking it. Same @ES-Alexander. |
I was trying to test, but BlueOS doesn't want to play ball with either of my cameras, so I can't set up two video stream sources to do recordings with (just one with the fake source) :( I've spent the past hour+ on this, and need to get some sleep, so I think I'll have to leave it for next week unfortunately to try to test it properly :-\ |
The old pipeline was saving the entire log in memory, which was affecting the application's performance.
With this new approach, there's no more logs in memory. All log points are saved in the local database, and retrieved when the request to generate the log file is made.
I took the opportunity of this refactor to also address the problem of multiple log requesters interfering with each other. Now the system will not stop logging while there's an active log requester.
Fix #1446