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

Reduce default JFlex buffer size from 16k #262

Closed
cowtowncoder opened this issue Apr 10, 2021 · 0 comments
Closed

Reduce default JFlex buffer size from 16k #262

cowtowncoder opened this issue Apr 10, 2021 · 0 comments
Labels
TOML Issue related to TOML format backend

Comments

@cowtowncoder
Copy link
Member

Although performance is not the most important aspect of TOML handling, I did some profiling for funsies and noticed that JFLex default buffer size of 16k characters (32kB) is rather expensive, considering it is not recycled.
Since it looks like there is a way to configure that, as per

https://github.com/jflex-de/jflex/blob/master/docs/md/lex-specs.md

(specifically, use %buffer directive)

let's tune it down a bit: most input does not require contiguous buffer of that size, and if something does, Lexer just grows buffer size as necessary.

@cowtowncoder cowtowncoder added the TOML Issue related to TOML format backend label Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TOML Issue related to TOML format backend
Projects
None yet
Development

No branches or pull requests

1 participant