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

Optimize the parser #9

Open
remkade opened this issue Nov 1, 2022 · 0 comments
Open

Optimize the parser #9

remkade opened this issue Nov 1, 2022 · 0 comments
Assignees

Comments

@remkade
Copy link
Owner

remkade commented Nov 1, 2022

The parser is pretty simple right now and only has 2 paths that both could probably be optimized.

Current Status

Here's the current structure:

  1. Start by attempting an implicit parse (python 3.10.0 style) with implicit_parser().
  2. If success, return simple MatchSpec.
  3. Otherwise, backtrack and begin using full_matchspec_parser() which implements the exhaustive spec.

Possible Approaches

Optimize for Real World Parsing

If someone has the time, it would be ideal to collect some data from the main, conda-forge, and bioconda repodata.json files and try to target a parser towards the most common types of matchspecs. I think its unlikely that channel/subdir are used often, so finding a way to make that package >= 1.0.0 style case faster might work on real world use cases.

General Optimizations

Another approach that would definitely have a lot of potential is to explore just general code optimizations. So far there has been very little time spent on this, so I'm sure someone with the skill and knowledge of nom could really improve the parsing speed.

@remkade remkade added this to MatchSpec Nov 7, 2022
@remkade remkade moved this to Todo in MatchSpec Nov 7, 2022
@AndrewVallette AndrewVallette self-assigned this Nov 9, 2022
@remkade remkade moved this from Todo to In Progress in MatchSpec Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants