Replace embedded resource text files with inline data for Intl CLDR data by lahma · Pull Request #2343 · sebastienros/jint (original) (raw)

@lahma @claude

Convert 6 of 7 embedded .txt resource files in Jint/Native/Intl/Data/ to inline static readonly dictionary initializers in companion .Data.cs partial class files. This eliminates runtime text parsing, StreamReader allocations, and reflection-based GetManifestResourceStream calls for these data files.

LikelySubtags.txt (133 KB) is kept as an embedded resource since inline dictionary entries would add ~217 KB to the DLL due to UTF-16 string encoding. Its loader is updated from the non-thread-safe ??= pattern to Lazy.

ComplexLanguageMapping and VariantMapping structs converted to readonly record structs with primary constructors.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@lahmaenabled auto-merge (squash)

March 22, 2026 08:08

@lahma lahma deleted the inline-data branch

March 22, 2026 08:22

This was referenced

Mar 23, 2026

This was referenced

Jun 8, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})