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

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