[mythtv-commits] mythtv commit: r14674 by cpinkham

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Sat Oct 13 07:54:38 UTC 2007


      Author: cpinkham
        Date: 2007-10-13 07:54:38 +0000 (Sat, 13 Oct 2007)
New Revision: 14674
   Changeset: http://cvs.mythtv.org/trac/changeset/14674

Modified:

   trunk/mythtv/programs/mythbackend/autoexpire.cpp
   trunk/mythtv/programs/mythbackend/backendutil.cpp
   trunk/mythtv/programs/mythbackend/backendutil.h
   trunk/mythtv/programs/mythbackend/encoderlink.cpp
   trunk/mythtv/programs/mythbackend/mainserver.cpp

Log:

Create a cache of the recording filenames on the backend.  With the
addition of Storage Groups, several operations have been slowed down by the
fact that they always have to look for the recording file using
ProgramInfo::GetPlaybackURL() which searches through the necessary Storage
Group directories.  Previously with only a single directory, we knew exactly
where to look for the file.  This patch adds a simple cache to keep track of
these filenames, so we don't have to look for them every time.  Before using
a filename value from the cache, the code does check for existence, so if a
file is moved, the cache will automatically be updated the next time it is
queried for that recording's file.  The cache entry is also removed when a
file is deleted.

A couple operations that are sped up by this include:

- The frontend checking the last modified time of preview pixmaps on the
  backend when on the Watch Recordings screen.
- Loading the recordings list when a slave backend is down, but the files are
  accessible via the master.
- The Auto Expirer searching for files on a particular filesystem.






More information about the mythtv-commits mailing list