Skip to content

Investigate cheaper no-interning and multi-isolate cache sharing for NormalizedPath #344

Description

@coderabbitai

Background

PR #343 makes the NormalizedPath interning cache configurable (via the new Cache<K, V> interface, LruCache, and NoCache implementations). While this addresses the performance cliff identified in #342 and #118, a follow-up investigation is needed.

Problem

  • The current approach (even with NoCache) may not be as cheap as possible when interning is disabled. There may be room to make the no-interning path even lighter.
  • Dart-side caches (including LruCache) cannot be shared across isolates. This significantly limits their effectiveness in multi-isolate deployments, where each isolate maintains its own separate cache with no shared benefit.

Tasks

  • Investigate whether the no-interning (NoCache) code path can be made even cheaper (e.g., avoiding unnecessary allocations or lookups entirely).
  • Investigate options for cache sharing or coordination across isolates (e.g., using SendPort/ReceivePort, native code, or alternative architectural approaches).
  • Document the multi-isolate limitation clearly in the public API if no sharing solution is feasible.

References

Requested by

@nielsenko

Metadata

Metadata

Assignees

Labels

area: routingIssues related to routing.enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Backlog 🗂️

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions