Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider delaying parse_regex's transformations #541

Open
CosmicHorrorDev opened this issue May 2, 2024 · 0 comments
Open

Consider delaying parse_regex's transformations #541

CosmicHorrorDev opened this issue May 2, 2024 · 0 comments

Comments

@CosmicHorrorDev
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant