dotnet / dotnet/docfx

[Feature Request] Enable faster UID search when using `xrefmap.json` for .NET types

Open
#9,821 2 comments 0 reactions 0 assignees View on GitHub
xref
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Is your feature request related to a problem? Please describe.**

When using xrefmap for .NET types.
It's recommended to use xrefmap file that is located at `https://github.com/dotnet/docfx/raw/main/.xrefmap.json`. (By #9659.)

**Problems**

This file contains `312235` reference items.
But the `sorted: true` property is not set.
So when searching for specific `uid`. It requires to execute liner search.

**Describe the solution you'd like**

As far as I've tested.
These items are already sorted by UID with `InvariantCulture` order.
So it can use faster binary search. if `sorted: true` property is set.

**Additional Information**
Alternatively. It might possible to use following xrefmap files.
Is these URLs are still supported?

1. `https://learn.microsoft.com/en-us/dotnet/.xrefmap.json` (316 MB)
2. `https://learn.microsoft.com/en-us/dotnet/xrefmap.yml` (283 MB)
- This yml file set `sorted: true` by default

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.