-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed as duplicate of#25838
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
@Override
public Mono<Object> decodeToMono(Publisher<DataBuffer> input, ResolvableType elementType,
@Nullable MimeType mimeType, @Nullable Map<String, Object> hints) {
return Mono.deferContextual(contextView -> {
Map<String, Object> hintsToUse = contextView.isEmpty() ? hints :
Hints.merge(hints, ContextView.class.getName(), contextView);
return DataBufferUtils.join(input, this.maxInMemorySize).flatMap(dataBuffer ->
Mono.justOrEmpty(decode(dataBuffer, elementType, mimeType, hintsToUse)));
});
}In decodeToMono, it seems that all DataBuffers need to be awaited before deserialization can proceed. This implies higher memory overhead. Why not use NonBlockingJsonParser instead like decode? It seems that this could save memory and avoid blocking.
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue