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 #133
Instead of re-deriving the same reflection facts on every single topic mapping request, cache them once.
Tasks
TopicMappingService:Activator.CreateInstance()callInitializeCollection()TopicFactory.Create()TypeAccessorandMemberAccessor:TypeAccessor,MemberAccessor)TopicMappingService); see PreloadTopicPayloadas part ofMapAsync()#133