-
Notifications
You must be signed in to change notification settings - Fork 129
Condense rules with 'or' filters #206
Comments
this seems quite useful to fix. I had a quick look but came up empty trying to see where or why this occurs. It seems like Wild, likely wrong guess, does this has to do with missing combinators? https://github.com/cloudhead/less.js/blob/master/lib/less/parser.js#L1055 |
No, this is more about additional logic that would need to be implemented in
There are no |
Okay, make sense. Seems like implementing that logic, if doable, would be a solid benefit to both XML load time and Mapnik render time, since it would reduce the # of expressions that need to get parsed (which is the current overwhelming bottleneck in XML loading in mapnik) and would reduce the # of expressions and rules that get evaluated. So, would be great to see this working. |
This is going to be a deep one. Right now the entire filter system is written with the assumption that there will be a single
In which we do need to deduplicate styles rather than forming |
I'll open up an experimental branch that doesn't do as much de-duping, but it'll both require the same kind of re-testing that we will need with #20 and might worsen rule-explosion problems a bit. |
Experimental branch at https://github.com/mapbox/carto/tree/natural-filters - it's quite a departure. |
cool, more reason for starting to build up a visual test suite |
The example style below will result in an XML file with 9 separate rules. But Mapnik XML supports 'or' in filters like
([type] = 'foo' or [type] = 'bar')
and it really only needs to be one rule.Ideally Carto could just condense these automatically, but alternatively there could be some kind of
key in value1, value2, ...
syntax. Thoughts?The text was updated successfully, but these errors were encountered: