Skip to content

Performance issues on 0.8.0 and dynamic strings #415

@prikha

Description

@prikha

Problematic code input:

("foo: #{a}\n
foo: #{a}\n
foo: #{a}\n
foo: #{a}\n
foo: #{a}")

Reproduction:

Unparser.parse(Unparser.unparse(code))
# => Unparser::UnsupportedNodeError: Unparser cannot round trip this node: s(:dstr, (Unparser::UnsupportedNodeError)

Adding a few more lines to the snippet increases the execution time more than exponentially so that it hangs.

Flamegraph:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions