Skip to content

Chaining the :root selector and OOMs #2701

@kubukoz

Description

@kubukoz

Hi! I was wondering what'd happen if I used :root multiple times in a selector, and it turns out it's quite heavy.

An expression like :root(*):root(*) takes my machine about 2 seconds to run on a model with just the Smithy prelude, and :root(*):root(*):root(*) makes it instantly try to use all the available memory on the machine (I see heaps of over 16 gigs and counting, then OOMing).

Seems like something is off with the implementation - :root is clearly not like the other functions, but using it thrice shouldn't cause such drastic outcomes as an OOM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions