Skip to content

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

@colinl

Description

@colinl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions