Skip to content

Speedup .mdx files build - #619

Merged
mishig25 merged 1 commit into
huggingface:mainfrom
qubvel:speedup-doc-build
Aug 18, 2025
Merged

mishig25 merged 1 commit into
huggingface:mainfrom
qubvel:speedup-doc-build

Conversation

@qubvel

@qubvel qubvel commented Aug 18, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

getsourcelines is extremely slow because uses ast.parse to find class starting line, let's use a faster alternative and fallback to the slow one only if needed.

This speeds up .mdx build stage from 2.2 minutes to 20 seconds for en language of the transformers docs.

Screenshot 2025-08-18 at 16 56 01

@qubvel qubvel mentioned this pull request Aug 18, 2025
@mishig25
mishig25 self-requested a review August 18, 2025 16:05
@mishig25
mishig25 merged commit 82c3392 into huggingface:main Aug 18, 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