Skip to content

Conversation

@jameslamb
Copy link
Member

Contributes to rapidsai/build-planning#197 and https://github.com/rapidsai/ops/issues/4044

In #657 (and previously in #654), I'm working on adding an "Inactive Projects" section to https://docs.rapids.ai/api/, and struggling with how long iteration on the API docs takes... both locally and via merges to main and waiting for deployments.

After a merge to main, it takes slightly over an hour for a deployment to complete, and almost all of that time is spent in "post-processing".

Screenshot 2025-08-08 at 5 12 38 PM

(link to recent build)

This PR attempts to reduce that.

Today, ci/customization/customize_doc.py is invoked once per HTML file in all of the API docs. Here in 2025, that's close to 10,000 files.

To make the end-to-end time faster, this proposes the following:

  • invoking customize_doc.py once and passing it a list of files (instead of for looping around it and invoking it once per file)
  • only reading static config files like _data/releases.json once per post-processing run, instead of once per file

In local testing on my Mac, with these changes ./ci/post-process.sh run over all of the API docs completes in around 4 minutes. If we get anywhere even close to that amount of a speedup in CI, it'd help with iteration time here AND reduce the lead time to publish updates like #662 for users.

Notes for Reviewers

How I tested this

Using the steps added to the docs in #659

./ci/post-process.sh

Beyond that, we'll have to merge this to find out if it worked.

@jameslamb jameslamb requested a review from a team as a code owner August 8, 2025 22:21
@netlify
Copy link

netlify bot commented Aug 8, 2025

Deploy Preview for docs-rapids-ai ready!

Name Link
🔨 Latest commit 09150bf
🔍 Latest deploy log https://app.netlify.com/projects/docs-rapids-ai/deploys/689678724ee5210008fd6eea
😎 Deploy Preview https://deploy-preview-663--docs-rapids-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@ajschmidt8 ajschmidt8 left a comment

Choose a reason for hiding this comment

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

🔥 🔥 🔥 🔥

@jameslamb jameslamb merged commit 0c0433a into main Aug 11, 2025
6 checks passed
@jameslamb jameslamb deleted the ci/faster-customization branch August 11, 2025 13:58
@jameslamb
Copy link
Member Author

This did not quite work... the post-processing only processed raft and then stopped:

Customizing 14721 HTML files
Couldn't identify _site/api/raft/25.10/_static/webpack-macros.html as a supported theme type. Skipping file.
...
--- _site/api/raft/25.10/_static/webpack-macros.html ---
Done customizing

(build link)

I think I see the problem... now that the code in customize_doc.py is only invoked once (instead of 1 new process per file), using exit() like this is no longer appropriate:

print(
f"Couldn't identify {filepath} as a supported theme type. Skipping file.",
file=sys.stderr,
)
exit(0)

I'm not sure why I didn't observe this early stopping when I tested locally, as I did try to run this over the entire set of API docs, for all libraries. Maybe I had other local modifications that led to this not happening.

I'll put up a change shortly, and test it locally in a completely clean environment. Sorry.

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.

3 participants