Optimize Elasticsearch response parsing by using a non-blocking parser

Description

By default the RestClient uses a HeapBufferedResponseConsumerFactory with a buffer size of 100MB. If we used a non-blocking JSON parser, we could avoid the buffer altogether by parsing the response to a JsonObject on the fly.

Jackson seems to provide non-blocking parsing as of version 2.9: https://github.com/FasterXML/jackson-core/issues/57
Another non-blocking parser is Actson: https://github.com/michel-kraemer/actson

Also to be taken into account: the performance of the parser. See

Environment

None

Status

Assignee

Unassigned

Reporter

Yoann Rodière

Labels

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure