-
Notifications
You must be signed in to change notification settings - Fork 162
Replace link extraction code with Rust #4548
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
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
One or more of the following people are relevant to this code:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are now in https://github.com/qiskit-community/mdx-link-extract/
| "- To install Python, first check the \"Programming Language\" section on the [Qiskit PyPI project page](https://pypi.org/project/qiskit/) to determine which Python versions are supported by the most recent release. For download instructions, see the [Python Beginners Guide.](https://wiki.python.org/moin/BeginnersGuide/Download)\n", | ||
| "\n", | ||
| "<Admonition type = \"note\">\n", | ||
| "<Admonition type=\"note\">\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only discrepancy I found between the JS and Rust MDX libraries is that the Rust library doesn't allow spaces here. This only occurs in a handful of places in our repo.
arnaucasau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work, Frank! I love the speedup we got, especially with the API check:
Before: ~6 min
Now: ~40s
I tested the link checker locally and everything worked as expected!
Improving check time is important to our team (see #2854). A large portion of the time is spent in the internal link checker.
We discovered that parsing markdown and extracting links is a bottleneck in the link checker, so we rewrote that specific function in Rust (https://github.com/qiskit-community/mdx-link-extract/). From eyeballing the logs, this brings roughly a 10x speedup.