Skip to content

[DRAFT] feat(gcp-sphinx-docfx-yaml): introduce performance optimizations - #18588

Draft
daniel-sanche wants to merge 5 commits into
mainfrom
investigate_post_submit_checks_gcp-sphinx-docfx-yaml_01_speed-optimizations
Draft

daniel-sanche wants to merge 5 commits into
mainfrom
investigate_post_submit_checks_gcp-sphinx-docfx-yaml_01_speed-optimizations

Conversation

@daniel-sanche

@daniel-sanche daniel-sanche commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The dofx test is our slowest test, taking > 70 minutes for a single package (compute).

This PR attempts to speed up the task by adding optimizations to the gcp-sphinx-docfx-yaml package:

  • 2bb74d8: sort known ids once, instead of inside a loop
  • 7a1c741: immediately skip over words without "." characters, since they can't be uuids
  • c54391e: use custom no-op StandaloneHTMLBuilder class, to avoid doing rendering work for unused html files
  • 7b9ab23: use in-process markdown builder, instead of spanning new process and starting from scratch
  • 8dedfb7: cache default settings, instead of re-constructing on each node visit

@daniel-sanche daniel-sanche changed the title feat(gcp-sphinx-docfx-yaml): introduce performance optimizations [DRAFT] feat(gcp-sphinx-docfx-yaml): introduce performance optimizations Oct 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request optimizes cross-reference conversion by skipping plain words that do not contain dots and hoisting the sorting of known_uids out of a loop. However, the changes introduce a critical NameError because hard_coded_references is referenced in find_uid_to_convert where it is not in scope. The review feedback suggests reverting this reference and instead combining the collections as immutable tuples within convert_cross_references to safely avoid shared state mutation.

Comment thread packages/gcp-sphinx-docfx-yaml/docfx_yaml/extension.py
Comment thread packages/gcp-sphinx-docfx-yaml/docfx_yaml/extension.py

This branch has not been deployed

No deployments
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.

1 participant