node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

node-red-node-pi-gpio: python script nrgpio consuming a lot of processor time

Open colinl opened this issue 11 months ago • 0 comments

On an original PI Zero, running NR 4.0 on Bullseye, with Python 3 I find that for each gpio pin configured there is an instance of the nrgpio script running. Each one of those consumes about 3% of the processor, even when there is no IO activity. Even on a Pi 3 it is 0.7%. Looking at the source of nrgpio I deduce that the python input function may be polling stdin which is not ideal if I am right. Perhaps there is no alternative.

I have not been able to try it on python 2 to see if this is worse with 3, as I don't have a pi running 2.

colinl avatar Mar 04 '25 16:03 colinl