Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapbox Studio Filter Expression triggering high memory usage and slower framerate. #13339

Open
Dylansc22 opened this issue Dec 2, 2024 · 0 comments

Comments

@Dylansc22
Copy link

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
    ]
  ]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant