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

lexers.Get is very slow when the lexer is not found #714

Closed
bep opened this issue Nov 24, 2022 · 1 comment
Closed

lexers.Get is very slow when the lexer is not found #714

bep opened this issue Nov 24, 2022 · 1 comment

Comments

@bep
Copy link
Contributor

bep commented Nov 24, 2022

See benchmark in #713

I'm not sure if this is cacheable, but you should at least consider a note in the GoDoc, as this came as a pretty big surprise to me when I found this lighting up like a Christmas tree in a pprof profile.

@alecthomas
Copy link
Owner

I added a note for now, but we could also add another function to not fallback on file matching.

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

2 participants