> > On Monday, 26 June 2017 02:49:32 UTC+10, Thomas Carlin wrote:
> Unrelated to the original question, I noticed that my extension runs > several times (7 i think) for each report generation. It's trivial to > write a catch in so it only runs once, but i'm curious why this is. Could > you shed any light on this? > > -Thomas > I appreciate this thread has moved on from this question, but I wonder if what is being observed is the phenomenon whereby a Search List Extension (SLE) included in a given skin is called once for each report within the skin, irrespective of whether or not the SLE is used by each report. This has certainly been my experience with skins/SLE that I have put together/modified. Calling the SLE multiple times is probably not an issue in most cases, as the time taken to 'execute' the SLE is usually minimal; however, some complex SLEs I have written take a number of seconds to execute and this multiplied by the number of reports in the skin can be significant. If this is a problem the only real thing you can do is refactor your skin/reports to maybe have reports that call the 'problem' SLE in their own skin so as to avoid unnecessary calls to the SLE. Definitely had to do this with weeWX-WD. Gary -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
