Transforms called on sitemap update?

I was investigating excessive TCP traffic on my network (2GB more Internet traffic per day as usual), when I stumbled over very frequent calls to transform/duration.js. This script converts ISO dates to a more legible format on time timestamps on the sitemap.


.13 being my PC, .5 being the OHv2 machine…

Would it be better to let a rule do the conversion?

I am envisaging some ten panels reading the sitemap, thus creating lots of traffic to do browser-based conversions (As it seems).

Would this be a or the solution?

I think this is one you will have to experiment to find the best solution. I would imagine doing the conversions in a Rule would reduce the traffic.

But one has to an why you are using a transform for this. Typically if you have an iso date you would use a DateTime Item and label formatting to display the date how ever you want.

Are you reinventing the wheel or is there a detail that is missing to explain why lable formatting won’t work.

Thanks :slight_smile:

This particular one is for converting Linux uptime to day, hours, minutes…
… otherwise I use the date labels.

Have you put the transform into the Item label or into the sitemap? No idea if it makes any difference.

Thanks… it is actually in the item definition.

Number cpuUptime		        "CPU uptime [JS(duration.js):%s]"	(gSysInfo)	{ channel="systeminfo:computer:local:cpu#uptime" }