• A lot of the decoders use MimeType.ALL, so use MimeType.WILDCARD_TYPE for faster String.equals() using reference comparisons, specifically in MimeType.isWildcardType().
  • Move cheaper checks to the front of the canRead implementations. The media/mime checks appear to be cheaper than Class.isAssignableFrom which is cheaper than the ResolvableType checks, so putting them in the correct order (while preserving the and/or logic) gives an improvement.

before icicle graph for CPU from my stress test. this is for a JSON payload, thus the other readers should be skipped and take as little cpu as possible: Spring Improve performance of canRead() in HttpMessageReader's

after (see how MultipartHttpMessageReader and FormHttpMessageReader have shrunk): Spring Improve performance of canRead() in HttpMessageReader's