Sitelet https://github.com/IntelliTect/EssentialCSharp.Web/pull/1416
Skip to content

[repo-assist] perf: index related section lookups - #1416

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/perf-related-section-lookup-aef0d0ffb9233815
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/perf-related-section-lookup-aef0d0ffb9233815

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated PR from Repo Assist, an AI assistant for this repository.

Summary

FindRelatedSections previously searched every site mapping for each semantic result. This change builds a per-request chapter/heading index once and uses dictionary lookups, reducing the mapping phase from O(results × mappings) to O(mappings + results) while preserving case-insensitive matching and first-match behavior.

Root cause and rationale

Related-section results performed a linear scan of the complete site-mapping collection for every result. As the book mapping grows, that repeated work scales unnecessarily. The local index keeps the existing result and fallback behavior but avoids repeated enumeration.

Test Status

  • ✅ dotnet build EssentialCSharp.Web/EssentialCSharp.Web.csproj --configuration Release --no-restore
  • ⚠️ dotnet test EssentialCSharp.Web.Tests/EssentialCSharp.Web.Tests.csproj --configuration Release --no-restore: 149 passed, 2 pre-existing external integration failures (CaptchaService_Verify_Success and KnownBreachedPassword_IsDetected) because their third-party services were unavailable in this environment.
  • ✅ git diff --check

No new dependencies were added.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.hcaptcha.com
  • api.pwnedpasswords.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.hcaptcha.com"
    - "api.pwnedpasswords.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@4bc8419fad05e6b032741cbfd189986700bcf71c

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants