Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function PCD8544.pixel is four times slower than the old Adafruit-Nokia-LCD #16

Open
RigacciOrg opened this issue Jan 3, 2022 · 0 comments

Comments

@RigacciOrg
Copy link

I rewrote an old Python script that is running on the Raspberry Pi model B attached to a Nokia 5110-3310 LCD screen.
The refactoring required the switching from Python2 to Python3 and switching from the old Adafruit_Nokia_LCD library to the new Adafruit_CircuitPython_PCD8544 one. Now I get a severe performance problem with very high CPU load: the old system was running with a load average of 0.20, the new system is running with a load average of 0.90.

Using the yappi Python profiler I recorded the time spent in each funcion call; it turned out that the most time consuming is
PCD8544.image calling PCD8544.pixel.

Do you think that the Adafruit_CircuitPython_PCD8544 is suitable for the old Raspberry Pi model B? I need an LCD image refresh > 1 Hz, because I want to display a clock (including seconds), plus some other data varying at the same rate.

Should I stay with the old Adafruit-Nokia-LCD library? Is it compatibile with Python 3.9?

The system differences are:

  • Old system

    • Raspbian based on Debian 8.0
    • Linux Kernel 4.9.35
    • Python 2.7.9
    • Python libraries:
      • Adafruit-Nokia-LCD (0.2.0)
      • Adafruit-PureIO (0.2.1)
      • Adafruit-GPIO (1.0.4)
      • RPi.GPIO (0.6.3)
  • New system

    • Raspbian based on Debian 11.2
    • Linux Kernel 5.10.63
    • Python 3.9.2
    • Python libraries:
      • adafruit-circuitpython-pcd8544 (1.2.6)
      • adafruit-circuitpython-busdevice (5.1.1)
      • adafruit-circuitpython-framebuf (1.4.8)
      • Adafruit-PureIO (1.1.9)
      • RPi.GPIO (0.7.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant