[mythtv-firehose] mythtv branch master updated by jstichnoth. v0.28-pre-2860-gb43b11c

Git Repo Owner noreply at mythtv.org
Sat Apr 25 17:36:59 UTC 2015


The branch, master has been updated on the
mythtv repository by gitolite user jstichnoth.
       via  b43b11ca3062086d20ee0072368e9dd3646a5faa (commit)
      from  017cc5c8bb66109500e2c4ff771abcac4f87c034 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b43b11ca3062086d20ee0072368e9dd3646a5faa
Author:    Jim Stichnoth <jstichnoth at mythtv.org> at Sat, 25 Apr 2015 10:04:16 -0700
Committer: Jim Stichnoth <jstichnoth at mythtv.org> at Sat, 25 Apr 2015 10:04:16 -0700
URL:       http://code.mythtv.org/cgit/mythtv/commit/?id=b43b11ca3062086d20ee0072368e9dd3646a5faa

Reduce "Watch Recordings" sluggishness by caching jobqueue state.
Refs #8962, refs #7990.

Currently, when navigating the Watch Recordings screen, every time the
cursor position is moved, 4 jobqueue queries are issued for each item
visible on the screen (the actual number being controlled by the
theme).  These queries are done within the UI thread, which makes
navigation noticeably sluggish on most any setup that isn't a
moderately powerful combined frontend/backend.

Ideally, any time a job's status changes (including queue addition and
removal), we would call ProgramInfo::SendUpdateEvent() to get the
Watch Recordings entry updated, along with any other
ProgramInfoUpdater subscribers.  Also,
ProgramInfo::LoadProgramFromRecorded() and LoadFromRecorded() would
set up the necessary commflag and transcode flags in the ProgramInfo
object.

However, in the current jobqueue implementation, this is not very
practical because of functions like:
  JobQueue::DeleteJob(int jobID)
  JobQueue::ChangeJobCmds(int jobID, int newCmds)
  JobQueue::ChangeJobFlags(int jobID, int newFlags)
  JobQueue::ChangeJobStatus(int jobID, int newStatus, QString comment)
  JobQueue::ChangeJobComment(int jobID, QString comment)
  JobQueue::ChangeJobArgs(int jobID, QString args)
  JobQueue::ChangeJobHost(int jobID, QString newHostname)
  JobQueue::CleanupOldJobsInQueue()
where the ProgramInfo isn't readily available (though it could be
found given another query on jobID for all but the last function).

Instead, in this approach, the PlaybackBox locally caches the jobqueue
contents, reloading every 15 seconds as needed.  The reload blocks the
UI thread, but only for a small fraction of the time that the current
implementation was blocking it, so it's unlikely a user pay much
attention to this once-in-15-seconds query.

This code should be removed once #7990 makes jobs more autonomous.



-----------------------------------------------------------------------

Summary of changes:
 mythtv/libs/libmythtv/jobqueue.cpp           |   26 +++++-----
 mythtv/libs/libmythtv/jobqueue.h             |    2 +
 mythtv/programs/mythfrontend/playbackbox.cpp |   66 +++++++++++++++++++++++---
 mythtv/programs/mythfrontend/playbackbox.h   |   27 +++++++++++
 4 files changed, 101 insertions(+), 20 deletions(-)

-- 



More information about the mythtv-firehose mailing list