Issue: Weewx/Cheetah is calling the same Generator for each and every Templates

37 views
Skip to first unread message

Oz Greg

unread,
Jun 10, 2013, 6:34:49 AM6/10/13
to weewx-de...@googlegroups.com
All,

I have found an interesting issue in Cheetah (weewx) template file generation engine function..  For every template being executed the same report generator(s) is being called thus repeating the same set of queries over and over again which in my case is adding a large overhead to the WD skin generation and I am at a loss on how to prevent this issue..  (Logs are below)..

Is this expected behaviour or am I missing some trick to stop this..

Thanks

[FileGenerator]

  [[ToDate]]
        #
        # Reports that show statistics "to date", such as day-to-date,
        # week-to-date, month-to-date, etc.
        #

        [[[CLIENTRAW]]]
template = clientraw.txt.tmpl

[[[CLIENTRAWEXTRA]]]
template = clientrawextra.txt.tmpl

[[[CLIENTRAWHOUR]]]
template = clientrawhour.txt.tmpl

[[[CLIENTRAWDAILY]]]
template = clientrawdaily.txt.tmpl
                [[[TESTAGS]]]
template = testtags.php.tmpl


[Generators]
        generator_list = user.wdtags.WDFileGenerator, weewx.reportengine.CopyGenerator

Jun 10 20:19:06 raspberrypi weewx[4160]: reportengine: wdtags.py 60 by one minute stats executed in 1.82 seconds
Jun 10 20:19:06 raspberrypi weewx[4160]: reportengine: wdtags.py last 24 hourly stats executed in 0.88 seconds
Jun 10 20:19:08 raspberrypi weewx[4160]: reportengine: wdtags.py hourly_stats executed in 1.39 seconds
Jun 10 20:19:09 raspberrypi weewx[4160]: reportengine: wdtags.py 15minute_stats executed in 0.71 seconds
Jun 10 20:19:09 raspberrypi weewx[4160]: reportengine: wdtags.py last 31 Days stats executed in 0.01 seconds
Jun 10 20:19:09 raspberrypi weewx[4160]: reportengine: wdtags.py last Minute Block stats executed in 0.11 seconds
Jun 10 20:19:09 raspberrypi weewx[4160]: reportengine: wdtags.py last 12 Months stats executed in 0.01 seconds
Jun 10 20:19:09 raspberrypi weewx[4160]: reportengine: wdtags.py executed in 4.98 seconds
Jun 10 20:19:09 raspberrypi weewx[4160]: reportengine: wdtags.py all_stats executed in 0.00 seconds
Jun 10 20:19:11 raspberrypi weewx[4160]: reportengine: wdtags.py 60 by one minute stats executed in 1.77 seconds
Jun 10 20:19:12 raspberrypi weewx[4160]: reportengine: wdtags.py last 24 hourly stats executed in 0.84 seconds
Jun 10 20:19:13 raspberrypi weewx[4160]: reportengine: wdtags.py hourly_stats executed in 1.43 seconds
Jun 10 20:19:14 raspberrypi weewx[4160]: reportengine: wdtags.py 15minute_stats executed in 0.68 seconds
Jun 10 20:19:14 raspberrypi weewx[4160]: reportengine: wdtags.py last 31 Days stats executed in 0.02 seconds
Jun 10 20:19:14 raspberrypi weewx[4160]: reportengine: wdtags.py last Minute Block stats executed in 0.11 seconds
Jun 10 20:19:14 raspberrypi weewx[4160]: reportengine: wdtags.py last 12 Months stats executed in 0.01 seconds
Jun 10 20:19:14 raspberrypi weewx[4160]: reportengine: wdtags.py executed in 4.91 seconds
Jun 10 20:19:16 raspberrypi weewx[4160]: reportengine: wdtags.py all_stats executed in 0.00 seconds
Jun 10 20:19:18 raspberrypi weewx[4160]: reportengine: wdtags.py 60 by one minute stats executed in 1.71 seconds
Jun 10 20:19:19 raspberrypi weewx[4160]: reportengine: wdtags.py last 24 hourly stats executed in 0.88 seconds
Jun 10 20:19:20 raspberrypi weewx[4160]: reportengine: wdtags.py hourly_stats executed in 1.40 seconds
Jun 10 20:19:21 raspberrypi weewx[4160]: reportengine: wdtags.py 15minute_stats executed in 0.72 seconds
Jun 10 20:19:21 raspberrypi weewx[4160]: reportengine: wdtags.py last 31 Days stats executed in 0.01 seconds
Jun 10 20:19:21 raspberrypi weewx[4160]: reportengine: wdtags.py last Minute Block stats executed in 0.11 seconds
Jun 10 20:19:21 raspberrypi weewx[4160]: reportengine: wdtags.py last 12 Months stats executed in 0.15 seconds
Jun 10 20:19:21 raspberrypi weewx[4160]: reportengine: wdtags.py executed in 5.03 seconds
Jun 10 20:19:22 raspberrypi weewx[4160]: reportengine: wdtags.py all_stats executed in 0.00 seconds
Jun 10 20:19:24 raspberrypi weewx[4160]: reportengine: wdtags.py 60 by one minute stats executed in 1.77 seconds
Jun 10 20:19:24 raspberrypi weewx[4160]: reportengine: wdtags.py last 24 hourly stats executed in 0.87 seconds
Jun 10 20:19:26 raspberrypi weewx[4160]: reportengine: wdtags.py hourly_stats executed in 1.40 seconds
Jun 10 20:19:27 raspberrypi weewx[4160]: reportengine: wdtags.py 15minute_stats executed in 0.71 seconds
Jun 10 20:19:27 raspberrypi weewx[4160]: reportengine: wdtags.py last 31 Days stats executed in 0.01 seconds
Jun 10 20:19:27 raspberrypi weewx[4160]: reportengine: wdtags.py last Minute Block stats executed in 0.11 seconds
Jun 10 20:19:27 raspberrypi weewx[4160]: reportengine: wdtags.py last 12 Months stats executed in 0.01 seconds
Jun 10 20:19:27 raspberrypi weewx[4160]: reportengine: wdtags.py executed in 4.94 seconds
Jun 10 20:19:28 raspberrypi weewx[4160]: reportengine: wdtags.py all_stats executed in 0.00 seconds
Jun 10 20:19:30 raspberrypi weewx[4160]: reportengine: wdtags.py 60 by one minute stats executed in 1.74 seconds
Jun 10 20:19:31 raspberrypi weewx[4160]: reportengine: wdtags.py last 24 hourly stats executed in 0.88 seconds
Jun 10 20:19:32 raspberrypi weewx[4160]: reportengine: wdtags.py hourly_stats executed in 1.42 seconds
Jun 10 20:19:33 raspberrypi weewx[4160]: reportengine: wdtags.py 15minute_stats executed in 0.68 seconds
Jun 10 20:19:33 raspberrypi weewx[4160]: reportengine: wdtags.py last 31 Days stats executed in 0.03 seconds
Jun 10 20:19:33 raspberrypi weewx[4160]: reportengine: wdtags.py last Minute Block stats executed in 0.12 seconds
Jun 10 20:19:33 raspberrypi weewx[4160]: reportengine: wdtags.py last 12 Months stats executed in 0.01 seconds
Jun 10 20:19:33 raspberrypi weewx[4160]: reportengine: wdtags.py executed in 4.93 seconds
Jun 10 20:19:35 raspberrypi weewx[4160]: filegenerator: generated 5 'toDate' files in 31.92 seconds
Reply all
Reply to author
Forward
0 new messages