Skip to content

perf(docs): match the inventory globs with one pattern for each class - #7644

Merged
dan-petty merged 4 commits into
mainfrom
perf/4979-inventory-class-patterns
Nov 28, 2026
Merged

dan-petty merged 4 commits into
mainfrom
perf/4979-inventory-class-patterns

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Compile one regular expression per documentation inventory class instead of repeating per-glob PurePosixPath.full_match calls across thousands of Markdown files.

src/devops_cli/docs/inventory.py translates each class's glob tuple with glob.translate(..., recursive=True, include_hidden=True) behind an @lru_cache keyed by tuple, registers reset_inventory_pattern_cache in tests/conftest.py, and streamlines hand_written_documents path matching (test_docs_cli_generate_and_check call drops from 6.77 s to 4.49 s).

Closes #4979

Change: openspec/changes/archive/2026-11-28-4979-inventory-class-patterns/

@dan-petty dan-petty added type/infra Type infra: the build, CI, images or cluster scope/docs Documents, guides, ADRs and generated references labels Nov 28, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 28, 2026 22:19
@devops-cli-service

Copy link
Copy Markdown
Contributor

Pull request #7644 has merge conflicts with main at commit 119fb33787a2. GitHub cannot merge it. Rebase the branch onto the current main, resolve the conflicts and push the branch.

@dan-petty
dan-petty enabled auto-merge (squash) November 28, 2026 23:24
@dan-petty
dan-petty merged commit 3d172ae into main Nov 28, 2026
27 checks passed
@dan-petty
dan-petty deleted the perf/4979-inventory-class-patterns branch November 28, 2026 23:55
dan-petty-release Bot added a commit that referenced this pull request Nov 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.241.1](v0.241.0...v0.241.1)
(2026-11-28)


### Performance Improvements

* **docs:** match the inventory globs with one pattern for each class
([#7644](#7644))
([3d172ae](3d172ae))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/docs Documents, guides, ADRs and generated references type/infra Type infra: the build, CI, images or cluster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(docs): match the inventory globs with one pattern for each class

1 participant