Aias00 opened a new issue, #6566: URL: https://github.com/apache/shenyu/issues/6566
## Description On a cache miss, `obtain` streams over **all** `META_DATA_MAP.values()`, calling `PathMatchUtils.match(data.getPath(), path)` (AntPathMatcher, which compiles a regex per call) for each, `findFirst()`. A single miss = O(M) AntPathMatcher invocations where M = number of registered metadata entries. Misses happen for every new/high-cardinality path and after any `clean(path)` invalidation. ## Location ``` shenyu-plugin-base/.../cache/MetaDataCache.java:122-138 ``` ## Impact High-cardinality traffic x M regex compiles. For a gateway with 1000 metadata entries and high path cardinality, every new path costs 1000 regex compiles. ## Suggested fix Index metadata by path prefix (trie) or precompile patterns keyed by metadata path. ## Related existing issue(s) None _Identified during the 2026-08-02 audit; full list in [`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
