Skip to content

Conversation

gante
Copy link
Member

@gante gante commented Jul 8, 2025

Speeds up the doc builder in the MDX building part by parallelizing the (embarrassingly parallel) loop.

Example of CI run from a PR in transformers: link (total time = 13:00)
Same, but with this PR: link (total time = 11:22, i.e. 15% speedup, docs preview)

To tackle the slow build time, the next part to look at is the JS part, invoked after the print("Building HTML files. This will take a while :-)") statement.

🤖 Made with AI 🤖

@gante gante requested a review from mishig25 July 8, 2025 16:29
@@ -170,7 +170,6 @@ def regex_closure(object_doc, regex):


def get_signature_component_svelte(name, anchor, signature, object_doc, source_link=None, is_getset_desc=False):
print("some things svelte")
Copy link
Member Author

Choose a reason for hiding this comment

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

(this one was polluting the CI runs :) )

@qubvel
Copy link
Member

qubvel commented Aug 18, 2025

Hah, didn't notice this PR, made another one, optimizing code instead of doing multiprocessing -> similar result

#619

@gante gante force-pushed the parallel_mdx_building branch from 8b2681f to 729f7dd Compare August 19, 2025 09:23
@gante
Copy link
Member Author

gante commented Aug 19, 2025

closing -> #619 is a more elegant solution :D

@gante gante closed this Aug 19, 2025
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.

2 participants