Skip to content

perf: Early return if there is no marimo code block in file#52

Merged
mscolnick merged 2 commits into
marimo-team:mainfrom
FBruzzesi:perf/early-return
Nov 7, 2025
Merged

perf: Early return if there is no marimo code block in file#52
mscolnick merged 2 commits into
marimo-team:mainfrom
FBruzzesi:perf/early-return

Conversation

@FBruzzesi
Copy link
Copy Markdown
Contributor

Description

I was trying to use mkdocs-marimo in narwhals, and the docs build went up significantly (from 3-4 seconds to ~40-50). I noticed in the logs that it's parsing all the files in docs_dir, but I had the marimo code blocks only on a subset on files.

By adding this early return, build time went from 40-50 to 12-15 seconds

@FBruzzesi FBruzzesi changed the title perf: Early return if no marimo code block perf: Early return if there is no marimo code block in file Nov 7, 2025
Copy link
Copy Markdown
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

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

thanks!

@mscolnick mscolnick merged commit d32f5c3 into marimo-team:main Nov 7, 2025
4 of 15 checks passed
@FBruzzesi FBruzzesi deleted the perf/early-return branch November 9, 2025 17:03
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