Skip to content

Tree traversing degradation on nodes with an enormous amount of children (follow-up #1356) #3558

@gregnis

Description

@gregnis

Problem

Follow up to #1356

Using the same test file (https://github.com/miks1965/tree-sitter-pascalabcnet/blob/master/src/parser.c) as in the referenced issue, parsing takes 8-9 seconds, and applying highlights - another 8-9 seconds. I tried the same file in Zed editor, and it has a similar lag before the code is highlighted.

Steps to reproduce

See the description

Expected behavior

See the description

Tree-sitter version (tree-sitter --version)

0.23.0

Operating system/version

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    perfPerformance related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions