Ah, maybe I need to have some more coffee. I had asked if I should move my SQL queries to get_extension_list(), even though they'r already there. Ok this makes sense now. Thanks!
Backing up a bit: > You may want to restructure your code to use a later binding. Do you have examples of what I should do, or what a later binding would be? I've stuffed everything into get_extension_list() since that's what sample code, and previous examples have shown. Happy to optimize further if you have a general direction I should follow? Thanks again On Tuesday, November 13, 2018 at 9:14:10 AM UTC-5, Tom Keffer wrote: > > Are you suggesting that every time an $alltime tag is called (even if in >> the same template?), the entirety of $alltime is re-generated? I guess >> that makes sense, but I don't have a grasp on why the values would change. >> Unless it has something to do with the Timebinder changing it's time search >> and the final array of $alltime isn't really "all time". >> >>> > The function get_extension_list() is called every time a template is > processed, whether or not it includes a $alltime tag. So, if you have 13 > templates, it will get called 13 times. Because some templates are "to > date," while others are for a specific time period (by month, or by year), > the "timespan" parameter can vary for each template. > > If you look again at the allstats example > <http://www.weewx.com/docs/customizing.htm#extending_the_list>, you'll > see that all it does in get_extension_list() is build and return > TimespanBinder objects. It doesn't actually hit the database. That > doesn't happen until Cheetah finds a tag with $alltime in it and, even > then, only when the final suffix to $alltime is evaluated (the "max" in > $alltime.outTemp.max). > > -tk >