Added time to produce report on Ver 4.3

101 views
Skip to first unread message

philip....@gmail.com

unread,
Feb 15, 2021, 12:02:17 PM2/15/21
to weewx-user
Hi
I upgraded from v4.1.1 to v4.4 and noticed in the logs that a report took 36 seconds to generate where it use to be only 1 second.
Starting back from v4.1.1 I found that the extra time started when I upgraded  from v4.2 to v4.3.
Im using a Pi4 and on a Pi3 the time was over 70 seconds.
After eliminating various pieces of code I find that the line
#set $min1 = $day.rain.sum.inch.format($WM, add_label=False) was causing the extra time.
The following is an extract and not the full code but as the NOOA report uses something similar and that works ok Im thinking that the data_binding is perhaps the cause or have I got the code wrong and was just lucky in older versions.

#for $day in $month($data_binding='sun_binding').days
=====
#set $min1 = $day.rain.sum.inch.format($WM, add_label=False)
===
        ===
#end for
Just wondered what changed in v4.3 as v4.2 work perfectly

Tom Keffer

unread,
Feb 15, 2021, 12:34:33 PM2/15/21
to weewx-user
Not much information here, but I am not aware of any changes that would cause this. 

What is the nature of the binding 'sun_binding'? Is it a sqlite database? MySQL on a remote server?

I assume the placeholder $WM is a simple formatting string.

How about a log? Set debug=1, restart weewxd, then post the log through the first reporting cycle. Or, if it's easier, you can use wee_reports.


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/9a1f1311-b9a2-4f09-9349-7eaddc54ca4dn%40googlegroups.com.

philip....@gmail.com

unread,
Feb 15, 2021, 3:40:40 PM2/15/21
to weewx-user
I have 2 davis consoles connected to the same Pi, the second one is only used to record sun hours via the rain terminal and is then stored on the sun.sdb database in the rain field.
This database is exactly the same as the weewx.sdb just with a different name and are both sqlite and Im using WEEWX MULTI to achieve this along with a third for AIRLINK.
The $WM is similar to the one used in NOAA reports #set $WM="%6.2f"
The log with debug=1 will take a 2/3 days.

philip....@gmail.com

unread,
Feb 16, 2021, 12:33:32 PM2/16/21
to weewx-user
Sorry guys upgraded my main machine and its all working OK.

Tom Keffer

unread,
Feb 16, 2021, 12:49:02 PM2/16/21
to weewx-user
Just for posterity, what upgrade did you do?

philip....@gmail.com

unread,
Feb 17, 2021, 7:54:49 AM2/17/21
to weewx-user
Have 2 pi's running, one is an experimental pi where if I change something on the web site I make sure it works before I add it to the main pi.
When I upgraded the main from v4.1.1 to v4.4 it worked OK but on the experimental pi it was there I noticed one of the reports was taking longer.
Now both are running v4.4 ok but not sure what caused the hiccup in the first place.
Have been playing with a monthly summaries web page which was the one report that started taking over 35 seconds to produce but is now OK on both machines.
Reply all
Reply to author
Forward
0 new messages