Skip to content

Consider delaying parse_regex's transformations #541

@CosmicHorrorDev

Description

@CosmicHorrorDev

syntect performs a few transformations to syntax definition's regexes while loading everything. The most notable one in terms of the final syntax set's size being the expansion of the various variables that can be included with a syntax definition. This expansion can be delayed to when the regex is compiled instead which can significantly reduce the embedded syntax definitions (my notes from testing with generating a syntax set without applying the transformations to regexes say that it took the total size of all of the LazyContexts that are stored in bat's syntax set from 720 to 673 KiB)

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