Skip to content

Optimize routing with faster lookup - #1

Draft
marafiq wants to merge 26 commits into
mainfrom
cursor/optimize-routing-with-faster-lookup-bb89
Draft

marafiq wants to merge 26 commits into
mainfrom
cursor/optimize-routing-with-faster-lookup-bb89

Conversation

@marafiq

@marafiq marafiq commented Aug 23, 2025

Copy link
Copy Markdown
Owner

Implement trie-like indexing for Web API HttpRouteCollection and RouteCollectionRoute to significantly speed up route matching.

The existing routing mechanism performs a linear scan through all registered routes. This PR introduces a multi-level index based on the HTTP method and the longest leading literal prefix of a route template. This allows the router to quickly filter down the set of candidate routes, reducing the number of full route evaluations and improving lookup performance and reducing allocations.


Open in Cursor Open in Web

cursoragent and others added 2 commits August 23, 2025 06:20
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
…uting

Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
@cursor

cursor Bot commented Aug 23, 2025

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

cursoragent and others added 24 commits August 23, 2025 06:42
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
Co-authored-by: muhammadadnanrafiq <muhammadadnanrafiq@gmail.com>
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.

2 participants