Skip to content

Faster fill/strokeText - #2612

Open
chearon wants to merge 2 commits into
masterfrom
ch/filltext-more-perf
Open

Faster fill/strokeText#2612
chearon wants to merge 2 commits into
masterfrom
ch/filltext-more-perf

Conversation

@chearon

@chearon chearon commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

I found a performance regression in v4 with fillText once I looked at real-world numbers. Added a benchmark to master that shows it. FT_Face stores caching info and cairo_set_font_size can destroy caching info as well.

I noticed that cairo_show_glyphs was slower vs when Pango calls it.

Pango holds the FT_Face until the process ends. node-canvas now keeps it
until the thread/InstanceData is deleted. Seems not great to me, but if
Pango does it that way, let's wait until it becomes a problem.
I noticed that cairo_show_glyphs was _still_ slower vs when Pango calls
it. Suspecting another instance had caching info attached, I read the
Cairo source code to confirm it.
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.

1 participant