KeycloakAdminService allocated a fresh JsonSerializerOptions at 4 serialize/deserialize sites (1x DefaultIgnoreCondition=WhenWritingNull, 3x PropertyNameCaseInsensitive=true). System.Text.Json caches type metadata per options-instance, so a new instance each call rebuilds that reflection cache (CA1869) — avoidable allocation/CPU on the Keycloak admin path (user create/update/query).
Hoisted to two static readonly instances shared across the sites. Identical config → no behavior change; immutable after first use, safe for concurrent reads. All 41 KeycloakAdminService tests pass; build clean.
(Continuation of #364 which fixed the same pattern in BookController. 66 CA1869 remain, mostly in test files where per-call allocation is irrelevant + a few other production services.) SonarQube rule external_roslyn:CA1869.
KeycloakAdminService allocated a fresh JsonSerializerOptions at 4 serialize/deserialize sites (1x DefaultIgnoreCondition=WhenWritingNull, 3x PropertyNameCaseInsensitive=true). System.Text.Json caches type metadata per options-instance, so a new instance each call rebuilds that reflection cache (CA1869) — avoidable allocation/CPU on the Keycloak admin path (user create/update/query).
Hoisted to two static readonly instances shared across the sites. Identical config → no behavior change; immutable after first use, safe for concurrent reads. All 41 KeycloakAdminService tests pass; build clean.
(Continuation of #364 which fixed the same pattern in BookController. 66 CA1869 remain, mostly in test files where per-call allocation is irrelevant + a few other production services.) SonarQube rule external_roslyn:CA1869.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
KeycloakAdminService allocated a fresh JsonSerializerOptions at 4 serialize/deserialize sites (1x DefaultIgnoreCondition=WhenWritingNull, 3x PropertyNameCaseInsensitive=true). System.Text.Json caches type metadata per options-instance, so a new instance each call rebuilds that reflection cache (CA1869) — avoidable allocation/CPU on the Keycloak admin path (user create/update/query).
Hoisted to two static readonly instances shared across the sites. Identical config → no behavior change; immutable after first use, safe for concurrent reads. All 41 KeycloakAdminService tests pass; build clean.
(Continuation of #364 which fixed the same pattern in BookController. 66 CA1869 remain, mostly in test files where per-call allocation is irrelevant + a few other production services.) SonarQube rule external_roslyn:CA1869.
Resolved in spikersoft-backend PR #379 (merged to master). Hoisted KeycloakAdminService's 4 per-call JsonSerializerOptions to 2 static readonly instances; all 41 tests pass. Closing.