Skip to content

Cache reflection plan for mapping services #136

Description

@JeremyCaney

Instead of re-deriving the same reflection facts on every single topic mapping request, cache them once.

Tasks

  • Cache constructor, collection, factory reflection lookups instead of resolving them per topic; on TopicMappingService:
    • Activator.CreateInstance() call
    • InitializeCollection()
    • TopicFactory.Create()
  • Cache other type-specific facts recomputed per topic on TypeAccessor and MemberAccessor:
    • Member lists
    • Validator lists
    • Composite attribute keys
  • Restrict reflection to public members only, matching what can actually be set (TypeAccessor, MemberAccessor)
    • This fixes a potential crash when trying to set a private setter
  • Build a single compiled "mapping plan" per view-model type, subsuming per-page re-derivation (TopicMappingService); see Preload TopicPayload as part of MapAsync() #133

Activity

  1. added this to the OnTopic 6.0.0 milestone on Jul 26, 2026
  2. self-assigned this
    on Jul 26, 2026
  3. added
    Area: MappingRelates to one of the `ITopicMappingService` interfaces or implementations.
    on Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: MappingRelates to one of the `ITopicMappingService` interfaces or implementations.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions