[mythtv-commits] mythtv commit: r7811 - in trunk/mythtv by cpinkham

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Wed Nov 9 04:54:42 EST 2005


      Author: cpinkham
        Date: 2005-11-09 09:54:41 +0000 (Wed, 09 Nov 2005)
New Revision: 7811
   Changeset: http://cvs.mythtv.org/trac/changeset/7811

Modified:

   trunk/mythtv/libs/libmyth/mythcontext.cpp
   trunk/mythtv/libs/libmyth/mythcontext.h
   trunk/mythtv/libs/libmyth/uitypes.cpp
   trunk/mythtv/libs/libmyth/uitypes.h
   trunk/mythtv/programs/mythfrontend/main.cpp

Log:

* Implement settings DB caching within MythContext.  We now cache the results
  of MythContext::Get*Setting() and MythContext::Get*SettingOnHost() calls
  to cut down on unnecessary database access.  Cached values are cleared
  whenever any frontend goes into the mythfrontend setup screen and the
  caching is turned OFF while in the settings screens.

  NOTE: This is not an excuse to forego caching within Myth classes, if a
        method uses a value from the DB settings table multiple times, the
        class should cache this value itself.

* Fix UIImageType to cache the PlayBoxTransparency setting internally so we
  don't have to re-get the value everytime an image is set such as on the
  status icons on the Watch Recordings screen when you scroll around through
  the recordings in the list.

The above two changes should make some things in Myth a bit snappier,
especially on the Watch Recordings screen.  Prior to this patch, scrolling
up/down through the list would cause about 10 database queries each time the
user scrolled.  Now that the settings are cached, the only DB querie
required when scrolling through recordings is to get the channel icon path.
Should be able to do something about that as well.  The speedup is more
noticeable if your database is remote to your frontend.

*******************************************************************************
* ANOTHER NOTE: This will require a "make clean" since it alters MythContext. *
*******************************************************************************






More information about the mythtv-commits mailing list