-
Notifications
You must be signed in to change notification settings - Fork 218
cache board model during initialization #196
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
Labels
Comments
pdp7
added a commit
that referenced
this issue
Nov 19, 2017
cache board type to avoid poor performance in functions that are called frequently like gpio_set_value() in source/event_gpio.c Signed-off-by: Drew Fustini <[email protected]>
Timing test shows large performance improvement after commit 3281479
Results before commit 3281479 with performance regression:
time-test.py
/opt/scripts/tools/version.sh
|
pdp7
added a commit
that referenced
this issue
Nov 19, 2017
Release 1.0.8: ============== Fixes: Issue #196: cache board type to avoid poor performance Issue #192: fix PocketBeagle PWM pin typo Issue #191: turn off RotaryEncoder's debug output by default Issue #188: GPIO is extremely slow (20ms to toggle) Issue #186: problems with UART shortlog: David Planella (12): Copy Encoder module comments to README.md Formatted Encoder README in markdown Fixed Encoder README formatting Removed QEP instructions from Encoder module Fixes to Encoder README Updated Encoder README Encoder README: added info on dedicated overlays Encoder README: updated info on pre-requisites Encoder README update Encoder README update Add logging support, turn off unconditional debug output Encoder: remove unused logging code Drew Fustini (3): Merge pull request #195 from dplanella/master Fix PocketBeagle PWM pin typo (#192) cache board type to avoid poor performance (#196) Signed-off-by: Drew Fustini <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While investigating #190, I realized it is very inefficient to check for board type inside
gpio_set_value()
:https://github.com./adafruit/adafruit-beaglebone-io-python/blob/master/source/event_gpio.c#L405
The function
beaglebone_blue()
executespopen()
to run grep:https://github.com./adafruit/adafruit-beaglebone-io-python/blob/master/source/common.c#L602
This should be cached so that it only needs to be done once when Adafruit_BBIO is initialized.
The text was updated successfully, but these errors were encountered: