On Fri, 8 Aug 2025 16:37:36 GMT, Daniel Gredler <dgred...@openjdk.org> wrote:

> Addresses recent slight performance regressions in some J2DBench benchmarks 
> focused on text drawing.
> 
> `CCharToGlyphMapper` and `CompositeGlyphMapper` cache glyph IDs, but after 
> JDK-8353230 they weren't caching glyph IDs for chars which might be affected 
> by the raw / non-raw glyph distinction, since the cached value may not be 
> correct if we ask for a raw glyph ID one time, but a non-raw glyph ID the 
> next time (or vice versa). This caching exception was the reason for the 
> slightly degraded performance (the `CCharToGlyphMapper` behavior was 
> affecting macOS, and the `CompositeGlyphMapper` behavior was affecting some 
> versions of Windows). This change splits the cache in each of these two 
> classes into two caches, one for raw glyph IDs and one for non-raw glyph IDs, 
> so that all glyphs can benefit from caching.
> 
> All of the font tests (`make test TEST="jtreg:test/jdk/java/awt/font"`) pass 
> for me locally with this change on Linux, macOS and Windows.

This pull request has now been integrated.

Changeset: c220a6c7
Author:    Daniel Gredler <dgred...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/c220a6c7bb5fe2e27514235f2efa9183a33f12a5
Stats:     70 lines in 2 files changed: 25 ins; 19 del; 26 mod

8359955: Regressions ~7% in several J2DBench in 25-b26

Reviewed-by: prr, serb

-------------

PR: https://git.openjdk.org/jdk/pull/26702

Reply via email to