WMS 1.3 GetMap request significantly slower than WMS 1.1.0 since GeoServer 2.11.4

Description

I noticed that, since version 2.11.4, the WMS 1.3.0 GetMap requests were returning the tiles very slowly. I tried all the GeoServer versions, from 2.11.4 to 2.13.0, and the same happens. The styling language used seems to also have an impact.

I've been using the GeoServer default config, plus the following: Marlin (I tried from version 7.5 to version 9.1), WPS plugin, and YSLD. No other plugin or library, like Image IO and such have been added.

If I switch to WMS version 1.1, it all works well.

Geoserver 2.10.4 works fine using either version, and either styling language.

Details
I created a layer from a PostGIS table with 600K polygons (whether it's an SQL view, or a simple FeatureType, the problem seems to be the same). Then:
1) Styled with the default polygon SLD, and requesting GetMap with WMS 1.1.0, the map is returned in 3 seconds. See screenshot 1.
2) Styled with the default polygon SLD, and requesting GetMap with WMS 1.3.0, the map is returned in 10 seconds. See screenshot 2.
3) Styled using custom YSLD (see note below), and requesting GetMap with WMS 1.1.0, the map is returned in 3 seconds. See screenshot 3.
4) Styled using custom YSLD (see note below), and requesting GetMap with WMS 1.3.0, the map is returned in 45 seconds. See screenshot 4.

To reproduce, create a layer from a large-ish table in PostGIS (something over 200K polygons, so the lag is noticeable), then use the Layer Preview functionality, even in untiled mode, and switch between WMS versions.

There are no errors or warnings in the GS log, and Postgres does not report anything weird, so the only attachments that I can provide are the four screenshots.

Thank you,
Manuel

Note:

Environment

Ubuntu 16.04.1 LTS
PostgreSQL 9.6 + PostGIS 2.3
Tomcat 9

Status

Assignee

Andrea Aime

Reporter

Manuel Timita

Triage

None

Fix versions

Affects versions

2.13.0
2.11.4
2.12.2

Components

Priority

Medium
Configure