Skip to content

Conversation

RGHenderson
Copy link
Contributor

@RGHenderson RGHenderson commented Jul 31, 2025

Closes #1996

@RGHenderson RGHenderson marked this pull request as ready for review July 31, 2025 16:28
@msujew
Copy link
Member

msujew commented Aug 1, 2025

Thanks, I'll take closer look at this next week!

@RGHenderson
Copy link
Contributor Author

Thanks. Happy to move things around and adjust behaviour as required - have set aside some time next week to get this in if possible. Just let me know :)
It's largely just a revival of the PR from march by @ydaveluy at this stage.

@RGHenderson
Copy link
Contributor Author

A small success story from use of this profiling tool:
We had a collection of languages all using a common expression base language. Some profiling of chevrotain itself led us to believe performance was being impacted by keyword-allowing ID rules. Use of this tool showed us that actually we were spending almost all the time parsing a slightly-incorrectly written expression rule.
From 12s in a stress test down to 25ms!

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I think this is already looking really nice! I believe there are a few more places where we could benefit from the profiling support (lexer, indexing), but these can be implemented separately.

Please see my comments below.

@RGHenderson
Copy link
Contributor Author

@msujew thanks! Hopefully those should be addressed.

@RGHenderson RGHenderson requested a review from msujew August 7, 2025 16:59
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I did some additional manual testing, and this works really well.

@msujew msujew merged commit 910e8a0 into eclipse-langium:main Aug 11, 2025
4 checks passed
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

Successfully merging this pull request may close these issues.

Simple langium language profiling tool
3 participants