xmltv Makefile.PL,1.457,1.458
Kevin Groeneveld <[email protected]> Sat, 09 Jul 2016 18:03:43 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12177
Modified Files:
Makefile.PL
Log Message:
tv_grab_sd_json: Improve efficiency of date/time handling.
After profiling the code using NYTProf I found that the DateTime parsing
and comparisons were the top usage of execution time. Adding my own parsing
functions and converting everything to seconds from epoch for comparisons
makes a huge difference in performance. Excluding network delays (or when
everything is already in the cache) the execution time is now about cut in
half.
DateTime usage is actually still the number one item in the profiler output
so there may still be room for improvement here but dates and times are
hard to get right with all the timezone, DST, leap, etc. issues.
Index: Makefile.PL
===================================================================
RCS file: /cvsroot/xmltv/xmltv/Makefile.PL,v
retrieving revision 1.457
retrieving revision 1.458
diff -C2 -d -r1.457 -r1.458
*** Makefile.PL 29 Jun 2016 00:00:00 -0000 1.457
--- Makefile.PL 9 Jul 2016 18:03:41 -0000 1.458
***************
*** 900,904 ****
blurb => '$$ Grabber for schedulesDirect.org SD-JSON service (many countries)',
exes => [ 'grab/sd_json/tv_grab_sd_json' ],
! prereqs => { 'DateTime::Format::DateParse' => 0,
'Digest::SHA' => 0,
'JSON' => 0,
--- 900,904 ----
blurb => '$$ Grabber for schedulesDirect.org SD-JSON service (many countries)',
exes => [ 'grab/sd_json/tv_grab_sd_json' ],
! prereqs => { 'DateTime' => 0,
'Digest::SHA' => 0,
'JSON' => 0,
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape