PERF: Extract non-varying text items out of glyph loop by greglucas · Pull Request #32351 · matplotlib/matplotlib · GitHub
Skip to content

PERF: Extract non-varying text items out of glyph loop - #32351

Closed
greglucas wants to merge 1 commit into
matplotlib:mainfrom
greglucas:agg-text-loop-hoist
Closed

greglucas wants to merge 1 commit into
matplotlib:mainfrom
greglucas:agg-text-loop-hoist

Conversation

@greglucas

Copy link
Copy Markdown
Contributor

PR summary

_draw_text_glyphs_and_boxes runs once per glyph of every string drawn. I get about 1.1-1.2x speedup locally with this.

AI Disclosure

AI found this and implemented the initial updates, I reviewed and cleaned up all code.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested

_draw_text_glyphs_and_boxes runs once per glyph of every string drawn.
@iccir

iccir commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@greglucas

Copy link
Copy Markdown
Contributor Author

@greglucas greglucas closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants