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

feature: Add a performance comparison to the README #146

Open
1 task done
vassudanagunta opened this issue Apr 20, 2024 · 1 comment
Open
1 task done

feature: Add a performance comparison to the README #146

vassudanagunta opened this issue Apr 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@vassudanagunta
Copy link

Did you check the tree-sitter docs?

Is your feature request related to a problem? Please describe.

There is no problem. This is a feature request.

Describe the solution you'd like

It would be useful to see how well the parser generated from this Tree-sitter grammar performs against CMark and CommonMark.js.

Describe alternatives you've considered

No response

Additional context

No response

@vassudanagunta vassudanagunta added the enhancement New feature or request label Apr 20, 2024
@MDeiml
Copy link
Collaborator

MDeiml commented Apr 22, 2024

Note that this parser has a different goal than normal parsers like CMark and CommonMark. Usual parsers are optimized for parsing the file once and outputting a rendered document (for example in html). This tree-sitter parser on the other hand only aims to provide enough information for syntax highlighting, no rendering functionality is provided and the results are "less correct" than what other parsers produce. It is optimized for incremental scanning of the document. Meaning the first parse might be slower but all subsequent parses are fast (or at least that's the idea).

A performance comparison might still make sense since I guess you could also implement syntax highlighting using them, but usually the editors that use tree-sitter for syntax highlighting might not be adapted to doing that. I also expect this method to be quite slow for large files.

But it is unclear what could even be used for a comparison, as this parser does not render anything, which seems to be the basis for comparison at least in CommonMark.js.

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

No branches or pull requests

2 participants