Currently, from the standard ParseAndValidate flow it doesn't provide any options to configure the underlying MultiSourceReader because the document set in the ParserEnviroment is always from a string so that it builds the MultiSourceReader with defaults.
This will make the MultiSourceReader not configurable especially the trackData option will always be true which creates memory allocation even if the tracked source locations are not needed. Can we introduce a new trackData option in the ParserOptions to allow users who want to stick with the standard parser flow but also want to configure it?
multiSourceReader = MultiSourceReader.newMultiSourceReader()
.reader(reader, null)
.trackData(environment.getParserOptions().isTrackData())
.build();