Thanks Dylan, your email subject did not say vector tiles so it was not noticed by Dave Blasby.
···
The problem I’m having is that the SLD doesn’t seem to have the desired effect when I start requesting vector tiles. It is incredibly slow at small scales. This makes me think that my data is still being processed instead of being excluded by the SLD. Nothing appears on the map as at that small a scale the features are being excluded by virtue of their size, but this means they are being tested by GeoServer for area/length etc so it’s really slow. Most of the time it takes so long that requests will timeout.
It sounds like you are using SLD correctly (to control what content is generated). The vector tiles code issues the same queries as defined in your SLD (so that should exclude content if that is how you have set up your SLD).
What data store are you using? Can you confirm that normal WMS performance is fine and only the vector tile output is slow? Perhaps you can link to some screen shots of the different output at different scales.
You have already seen the two options:
- if your features are being filtered based on your SLD rules correctly
- Or if they are being simplified (based on scale) and are no longer valid (and are thus not included). The WMS rendering code, and I assume the vector tile code, requests features back in simplified form, if your features are invalid when simplified (for example polygions simplified to a single point) then I would expect that feature to be skipped.
Can you test your SLD with points? To avoid simplification question, I cannot tell if you have found a bug or if your SLD rules are not working as you intend.