Mapbox Studio Filter Expression triggering high memory usage and slower framerate.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
The below filter expression is triggering a warning saying:
```
Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
and paste the contents of this message in the report.
```
I'm doing my part! 🫡
```
Filter Expression:
[
"all",
[
">",
[
"get",
"way_area"
],
150000
],
[
"any",
[
"!",
[
"in",
"park",
[
"downcase",
[
"case",
[
"==",
[
"get",
"name"
],
null
],
"",
[
"get",
"name"
]
]
]
]
],
[
"!",
[
"in",
"park",
[
"downcase",
[
"case",
[
"==",
[
"get",
"name"
],
null
],
"",
[
"get",
"name"
]
]
]
]
]
],
[
"case",
[
"<=",
[
"pitch"
],
45
],
true,
[
"<=",
[
"distance-from-center"
],
2
]
]
]Filter Expression:
[
"all",
[
">",
[
"get",
"way_area"
],
150000
],
[
"any",
[
"!",
[
"in",
"park",
[
"downcase",
[
"case",
[
"==",
[
"get",
"name"
],
null
],
"",
[
"get",
"name"
]
]
]
]
],
[
"!",
[
"in",
"park",
[
"downcase",
[
"case",
[
"==",
[
"get",
"name"
],
null
],
"",
[
"get",
"name"
]
]
]
]
]
],
[
"case",
[
"<=",
[
"pitch"
],
45
],
true,
[
"<=",
[
"distance-from-center"
],
2
]
]
]
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository file, test, or entry point. Start by reproducing the supplied filter expression and tracing the source of the “Failed to extract static filter” warning. Done means identifying the expression path responsible for the warning and verifying the resulting memory and framerate behavior after a fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100