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
[PVR] Fix for slow metadata updates of recordings #6085
Conversation
jenkins build this please |
great! there is an issue with vdr 2.0.3 which triggers recordings update frequently. |
ping @opdenkamp |
nice find. i think we can keep an open db instance in CPVRRecordings, so we don't need to open and close it in CPVRRecordings::GetSubDirectories? |
@opdenkamp Open database in constructor and close in destructor, and just rely on it being open within this class? |
yeah afaict that should be okay too |
See: http://forum.kodi.tv/showthread.php?tid=210774 metaron identified that entering the recordings screen wih 850 recordings on a Pi was taking about 40 seconds. The database is opened and closed for every recording, and this dominates the time taken. With the database open/close pulled out of the loop it now takes 1.4 seconds.
35df27f
to
a73d241
Compare
@opdenkamp updated to only open/close the database once with the CPVRRecordings class. Note: I don't have a setup to test this (it does compile). |
@@ -40,6 +41,8 @@ namespace PVR | |||
PVR_RECORDINGMAP m_recordings; | |||
unsigned int m_iLastId; | |||
bool m_bGroupItems; | |||
CVideoDatabase m_db; | |||
bool m_dbLoaded; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@popcornmix I will test it asap tomorrow. |
@Jalle19 updated with your suggestions |
Thanks, looks good. @xhaggi any thoughts? The change should be pretty harmless so I don't think a merge is that far away. |
jenkins build this please |
Tested (including Jalle19 fix) and approved ! |
Does it make sense to move UpdateMetadata() to CPVRRecordnings and pass the recording as parameter instead of the database reference? |
could do, but let's do that separately and get this issue fixed first. |
it will fix the issue too and we don't introduce code that we will change later. if fine for @popcornmix |
i don't see the benefit tbh |
[PVR] Fix for slow metadata updates of recordings
Goddammit, I forgot it was unsquashed. |
[PVR] Fix for slow metadata updates of recordings
See: http://forum.kodi.tv/showthread.php?tid=210774
metaron identified that entering the recordings screen wih 850 recordings on a Pi
was taking about 40 seconds. The database is opened and closed for every recording,
and this dominates the time taken. With the database open/close pulled out of the loop
it now takes 1.4 seconds.