Files
harfbuzz/src
Behdad EsfahbodandClaude Opus 4.8 708d59a507 [shape-plan] Cache the last shape plan looked up per face (#6550)
hb_shape_plan_create_cached2() walks the face's plan list on every call. The
list is never capped (by design, like the rest of the cache), so on a
long-lived face that has accumulated many plans, repeatedly reshaping with a
plan that sits deep in the list re-walks it each time.

Add a one-entry per-face "last plan" cache: an atomic pointer to the most
recently matched node, checked before the list walk and updated on hit and on
insert. Plan nodes are never freed before the face, so a cached pointer stays
valid; a stale or raced read just fails the key compare and falls through to
the walk. The common single-plan case already hit on the first node (the list
is front-prepended); this bounds the lookup for the many-plan case too.

Uses hb_atomic_t<T*>::set_release(), added in #6549.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-01 21:54:17 -07:00
..
2026-08-12 18:27:23 -06:00
2026-03-10 09:56:47 -03:00
2026-03-09 22:37:07 -06:00
2026-07-31 04:31:26 +03:00
2026-07-31 04:31:26 +03:00
…
2025-10-17 15:23:05 -06:00
…
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-10-22 19:31:32 +03:00
2026-10-16 00:19:21 +03:00
2025-09-15 23:56:25 -06:00
…
…
…
2026-04-20 05:10:48 +02:00
2026-04-20 05:10:48 +02:00
…
…
2026-10-22 17:05:31 +03:00
…
…
2025-04-08 01:58:10 -06:00
2025-08-07 22:38:58 -06:00
2026-07-31 17:49:40 +03:00
2026-07-31 17:49:40 +03:00
2025-08-07 22:38:58 -06:00
2026-03-19 00:45:24 +02:00
2026-07-31 04:31:26 +03:00
2026-09-21 00:41:07 +03:00
2026-04-18 10:58:44 -06:00
2026-09-21 00:41:07 +03:00
2026-08-26 22:27:05 +03:00
2026-08-19 16:00:05 -06:00
2025-07-23 21:39:23 +03:00
2026-07-31 17:49:40 +03:00
2026-07-30 12:00:47 -06:00
2026-10-01 16:27:20 -06:00
2026-07-31 17:49:40 +03:00
…
2025-08-28 15:58:39 -06:00
2026-04-20 01:29:49 +02:00
2026-10-22 19:31:32 +03:00
2026-08-12 18:33:09 -06:00
…
2026-06-05 13:44:29 +02:00
…