Reduce allocations for LocalizationService

Found in

EPiServer.CMS.Core 12.1.1

Fixed in

EPiServer.CMS.Core 12.3.0

Created

Dec 15, 2021

Updated

Jan 31, 2022

Area

CMS Core

State

Closed, Acceptance tests pass


Description

When resolving a language resource key such as /some/language/resource/key, additional strings were allocated for the different parts of the key. This was improved by using ReadonlyMemory<char> for the different segments so that calls to LocalizationService.GetString allocated less memory.