Ui Switch Slow to Respond to Click

I am using a ui Switch from the Dashboard widgets in my application.
For some reason, when I click on the switch to toggle it, it takes 5-6 seconds to react, i.e. toggle in the ui.

Any suggestions?

NR version is 0.20.5
Dashboard version 2.15.4

Thanks

have you tried a different browser?

Chrome and Edge, both have the same effect/response...

What platform?
What is?
What version of node-red, node.js and the dashboard?
What happens in the flow?
What else is running on the machine?

The NR server is running on Ubuntu 18.04 and my browser is running on my PC.
The NR and Dashboard version are noted in my original post.

The are other nodes in the main flow, mostly UI and HTTP Request nodes to collect data and display in the UI.

At the moment, nothing is actually connected the ui switch nodes, as I am just placing them in the ui.

Thanks...

Are both the NR machine and your PC on a local network?
Are other UI nodes slow too?

try importing this flow and pressing the button and switch. the text should show them going on and off.

[{"id":"497c5c0c.084fa4","type":"ui_switch","z":"400c8386.3b0104","name":"","label":"switch","tooltip":"","group":"dcf2fce6.0eb518","order":8,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"switch on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"switch off","offvalueType":"str","officon":"","offcolor":"","x":260,"y":100,"wires":[["a742f7f6.d6fa68"]]},{"id":"76a28525.38cd54","type":"ui_button","z":"400c8386.3b0104","name":"","group":"dcf2fce6.0eb518","order":9,"width":0,"height":0,"passthru":true,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"button on","payloadType":"str","topic":"","x":260,"y":180,"wires":[["e846660b.21b03"]]},{"id":"a742f7f6.d6fa68","type":"ui_text_input","z":"400c8386.3b0104","name":"","label":"","tooltip":"","group":"dcf2fce6.0eb518","order":10,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":440,"y":100,"wires":[[]]},{"id":"5a520acd.38d1fc","type":"ui_text_input","z":"400c8386.3b0104","name":"","label":"","tooltip":"","group":"dcf2fce6.0eb518","order":11,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":580,"y":180,"wires":[[]]},{"id":"e846660b.21b03","type":"function","z":"400c8386.3b0104","name":"","func":"// initialise the counter to 0 if it doesn't exist already\nvar count = context.get('count')||0;\ncount = Math.abs(count-1);\n// store the value back\ncontext.set('count',count);\n// make it part of the outgoing msg object\nmsg.count = count;\nnode.warn(\"count=\"+count);\nmsg.payload = (count > 0) ? \"button on\":\"button off\";\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":180,"wires":[["5a520acd.38d1fc"]]},{"id":"dcf2fce6.0eb518","type":"ui_group","z":"","name":"Default","tab":"df3f2d27.786758","disp":true,"width":"6","collapse":false},{"id":"df3f2d27.786758","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Is it slow to react.... or slow to display the result in the ui?
ie does it quickly recognise in the flow that the switch status has changed, but not visually in the ui?

I pasted the flow that zenofmud suggested, but it was after I restarted the NR server and the switch performed normally.

I added the switch again to my original flow, again after I restarted the NR server and the switch performed normally.

So something on the server was causing the ui delay, not sure what at this time. I did not see any error messages on the server console either. Although, I did a lot of deploys as I am creating my NR app, not sure if that's an issue or not...

I will let the NR server run for a while and see what happens. I will post to this thread if I see the same slowness in the ui again.

Thanks...

1 Like

If it happens again run top on the server and see if something is hogging the processor.

Will do... :+1: