Piston Resource Perfomance


#1

1) Give a description of the problem
I have a generic piston that I use for many multiple lights and a virtual dimmers. I have noticed the log shows long semaphore waits of up to 10 seconds. The stats show large load times as well on all the clones of this piston. I would like to fix this but not sure of the internal workings that cause this behaviour. If anyone has any suggestions to fix my errant piston that would be great.
PS The pistons don’t seem to suffer when executing.

**4) Post a Green Snapshot of the piston

**5) Attach any logs

4/01/2018, 07:10:31 +607ms
+9959ms ║Piston waited at a semaphore for 9715ms
24/01/2018, 07:00:41 +278ms
+10324ms ║Piston waited at a semaphore for 10030ms


#2

I am brand new to this platform, but I am seeing the same thing on my pistons! No matter what I do, same issue.


#3

I’ve heard it reported that Global variables can cause increased memory usage in pistons and can contribute to performance issues. Beyond that though, you’ve created some circular references and recursive routines in this piston which are also likely putting some strain on the system. For example, one of your conditions for executing this piston is if the Level changes, but then you next change the level, which is going to cause the piston to loop back and run again.


#4

Yeah I see your point there. I think I had done that to get the virtual dimmer to track the varying light level as it wasn’t updating with the changes. I’ll have a look at reworking that or proving out that loop.
Thanks


#5