CSS Styling extremely slows down when negative and positive numbers both included


I have recently started using CSS Styling instead of vanilla SLD to write a style which colourise population changes between two censuses.

When a CSS like the following was submitted, it takes minutes to process it.

  • It contains more than four rules AND

  • The rules spread from negative to positive numbers (zero is deemed as positive in this context)

For example, the following css were successfully saved within a second.

The next one saved very quickly too.

This was also OK

However, when the following was submitted, it took 4 to 5 minutes to process, which is an extreme drag in performance

This has also taken 5 minutes to process in my environment.

When it comes to six rule, the processing did not finish after 20 minutes.

To summarise, my observations,
1. If the number of rules are less than or equal to four, GeoServer always digests the CSS quickly.
2. If there are more than four rules and the selectors contain both numbers less than zero and those greater or equal to zero, GeoServer suddenly slows down to translate the CSS.
3. It looks like the increase of processing time is exponential against the number of rules.

This is quite frustrating as it takes ages every time to make a change to the styles that follow this pattern.


GeoSever 2.8.2
Amazon Linux 4.4.5 (Redhad 4.8.3 - 9)
Oracle JRE: 1.8.0_74
RAM 1024MB


Andrea Aime


Go Sato



Fix versions

Affects versions