Skip to content

Consider compressing SyntaxReference's variables #482

@CosmicHorrorDev

Description

@CosmicHorrorDev

From my understanding the separation for what gets compressed and what doesn't for SyntaxReferences are whether the values are expected to be used when trying to match on the syntax vs actually highlighting using the syntax. By that logic I believe that variables should also be compressed until used (lingering question: should this be included within LazyContexts or kept separate?)

The main motivation being that some syntax definitions have very large variables that wind up bloating the serialized size of SyntaxSets. For instance C.sublime-syntax has a window_types variable that's over a KiB (and bat's Julia sublime syntax has a variable with a value that's over 8 KiBs by itself)

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