[mythtv-commits] Ticket #7616: Revert settings cache behaviour introduced in [20828]

MythTV mythtv at cvs.mythtv.org
Thu Nov 19 15:32:37 UTC 2009

#7616: Revert settings cache behaviour introduced in [20828]
 Reporter:  danielk           |       Owner:  danielk
     Type:  patch             |      Status:  new    
 Priority:  minor             |   Milestone:  0.23   
Component:  MythTV - General  |     Version:  head   
 Severity:  medium            |     Mlocked:  0      
 We stopped caching default values, which caused a noticeable performance
 regression in playback startup. I'm attaching two patches to this ticket,
 one for trunk, the other for 0.22-fixes.

 I asked Michael T. Dean about this and the main problem this was trying to
 address was the caching of defaults when Get{,Num,Float}Setting was called
 without a default. Then "", 0, and 0.0 would get cached. To address this
 problem without the performance implications of not caching defaults at
 all we use a sentinel value of "<settings_sentinel_value>" and never cache
 that value. The secondary problem this tried to solve was
 Get{,Num,Float}Settings called with different defaults in two or more
 places, this coding error should not cause the types of problems that
 caching "", 0, and 0.0 can cause since anyone providing a default should
 be picking a sane one.

 Note: There is a bit of unneeded redundancy in the settings code, I will
 be addressing that in trunk in separate patch.

Ticket URL: <http://svn.mythtv.org/trac/ticket/7616>
MythTV <http://www.mythtv.org/>

More information about the mythtv-commits mailing list