dadhi / dadhi/XamlTea

Consider caching the component UI for the Model

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Description

We may hold the cache of UI identified by Model, may be with Model key for easy lookup. Then the `IComponent.View` may lookup for the cached UI if the Model did not change.

Naive question, what if we just added new UI to container, can we just reuse the rest of the container to minimize allocations? UI tree is immutable. What if we pass previous UI to View?

UI View(UI old, Model model) { .. }

May be it defeats the whole purpose of the model projection to view. Then the virtual UI Diff + Caching should be smart enough to do minimum allocations and do a fast real UI patching.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.