Harden API memory and CPU usage across Phases 19–22.
Bound list/PDF payloads, stream MinIO I/O with cancellation, paginate history and FHIR $everything, tighten OCR lifetimes/buffers, and add phase tracking docs.
This commit is contained in:
@@ -6,6 +6,9 @@ using Task = System.Threading.Tasks.Task;
|
||||
|
||||
public class FhirJsonOutputFormatter : TextOutputFormatter
|
||||
{
|
||||
private static readonly Lazy<FhirJsonSerializer> Serializer = new(() =>
|
||||
new FhirJsonSerializer(new SerializerSettings { Pretty = false }));
|
||||
|
||||
public FhirJsonOutputFormatter()
|
||||
{
|
||||
SupportedMediaTypes.Add("application/fhir+json");
|
||||
@@ -24,8 +27,7 @@ public class FhirJsonOutputFormatter : TextOutputFormatter
|
||||
var resource = context.Object as Resource;
|
||||
if (resource is null) return;
|
||||
|
||||
var serializer = new FhirJsonSerializer(new SerializerSettings { Pretty = true });
|
||||
var json = serializer.SerializeToString(resource);
|
||||
var json = Serializer.Value.SerializeToString(resource);
|
||||
await context.HttpContext.Response.WriteAsync(json, selectedEncoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user