Skip to content

bridge.py causes high CPU load on AR9331 #22

Closed
@ghost

Description

The polling of bridge.py consumes about 90% of the CPU (AR9331) on my ArduinoYun.
A quick-fix for this issue can be time.sleep(0.01), which brings down the value to about 30%.

The adopted version of bridge.py:

...
pr = packet.PacketReader(cp)
start_time = time.time()
with cbreak():
  #while time.time() - start_time < 100:
  while True:
    res = pr.process()
    if res == False:
      break
    time.sleep(0.01)

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