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

Include load_glyphs of full text string prior to character-processing loop in _update_text #85

Merged
merged 2 commits into from
Aug 17, 2020

Conversation

kmatch98
Copy link
Contributor

@kmatch98 kmatch98 commented Aug 17, 2020

This change improves performance when font glyphs have not been loaded. See issue: #84

On a brief test of plotting the following line of text with Helvetica-Bold-16.bdf, the time to create the label reduced from 9.0 seconds to 0.5625 seconds:

my_string = "Welcome to using displayio on CircuitPython!"

There was no significant difference in processing time when glyphs had already been loaded.

Note: This update will also help with bitmap_label.py

@tannewt tannewt self-requested a review August 17, 2020 21:36
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you! Great find.

@tannewt tannewt merged commit 5a514ce into adafruit:master Aug 17, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 19, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.7.0 from 2.6.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_EPD#41 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_EPD#40 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.8.1 from 2.8.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#83 from FoamyGuy/fix_anchored_position_rounding
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#85 from kmatch98/glyph_speedup
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#79 from kmatch98/bitmap_label
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#81 from kmatch98/anchor_fix
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

Successfully merging this pull request may close these issues.

None yet

2 participants