diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-02-11 13:41:29 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-02-11 13:41:29 +0100 |
commit | 2772964f99e7b14888d1faf4a2d3915e54f3e924 (patch) | |
tree | 07e36d6e8290ac3f2099a7ac31cf020c454b1670 | |
parent | b3891d831901da5e6ced3c022a3245a8f9f0bed7 (diff) | |
download | vdr-2772964f99e7b14888d1faf4a2d3915e54f3e924.tar.gz vdr-2772964f99e7b14888d1faf4a2d3915e54f3e924.tar.bz2 |
The epg.data file is now read in a separate thread
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | epg.c | 14 | ||||
-rw-r--r-- | epg.h | 8 | ||||
-rw-r--r-- | vdr.c | 5 |
5 files changed, 27 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9ba9c0fa..8a9f0e1f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -604,6 +604,7 @@ Helmut Auer <vdr@helmutauer.de> for a patch that was used to implement the command line options --edit and --genindex for suggesting to disable EPG processing for a while after a CLRE command + for suggesting to read the epg.data file in a separate thread Jeremy Hall <jhall@UU.NET> for fixing an incomplete initialization of the filter parameters in eit.c @@ -6836,7 +6836,7 @@ Video Disk Recorder Revision History - Fixed frozen live view with device bonding in case the bonded master is used for live viewing (reported by Uwe Scheffler). -2012-01-26: Version 1.7.24 +2012-02-11: Version 1.7.24 - Updated the Italian OSD texts (thanks to Diego Pierotto). - Fixed a high load in case a transponder can't be received. @@ -6851,3 +6851,5 @@ Video Disk Recorder Revision History minutes (thanks to Christoph Haubrich). - Symbolic links are no longer resolved in cRecordings::ScanVideoDir() (thanks to Sundararaj Reel). +- The epg.data file is now read in a separate thread to make the startup process + faster in case the file is very large (suggested by Helmut Auer). @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * - * $Id: epg.c 2.8 2012/01/08 14:59:38 kls Exp $ + * $Id: epg.c 2.9 2012/02/11 12:33:04 kls Exp $ */ #include "epg.h" @@ -1284,3 +1284,15 @@ const cSchedule *cSchedules::GetSchedule(const cChannel *Channel, bool AddIfMiss } return Channel->schedule != &DummySchedule? Channel->schedule : NULL; } + +// --- cEpgDataReader -------------------------------------------------------- + +cEpgDataReader::cEpgDataReader(void) +:cThread("epg data reader") +{ +} + +void cEpgDataReader::Action(void) +{ + cSchedules::Read(); +} @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * - * $Id: epg.h 2.5 2011/02/25 14:14:38 kls Exp $ + * $Id: epg.h 2.6 2012/02/11 12:29:55 kls Exp $ */ #ifndef __EPG_H @@ -213,6 +213,12 @@ public: const cSchedule *GetSchedule(const cChannel *Channel, bool AddIfMissing = false) const; }; +class cEpgDataReader : public cThread { +public: + cEpgDataReader(void); + virtual void Action(void); + }; + void ReportEpgBugFixStats(bool Reset = false); #endif //__EPG_H @@ -22,7 +22,7 @@ * * The project's page is at http://www.tvdr.de * - * $Id: vdr.c 2.27 2011/12/03 15:35:09 kls Exp $ + * $Id: vdr.c 2.28 2012/02/11 12:34:01 kls Exp $ */ #include <getopt.h> @@ -569,6 +569,7 @@ int main(int argc, char *argv[]) // Main program loop variables - need to be here to have them initialized before any EXIT(): + cEpgDataReader EpgDataReader; cOsdObject *Menu = NULL; int LastChannel = 0; int LastTimerChannel = -1; @@ -633,7 +634,7 @@ int main(int argc, char *argv[]) cSchedules::SetEpgDataFileName(AddDirectory(EpgDirectory, EpgDataFileName)); else cSchedules::SetEpgDataFileName(EpgDataFileName); - cSchedules::Read(); + EpgDataReader.Start(); } // DVB interfaces: |