Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sketch for adaptive funcui #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Oct 3, 2019

This is micro sketch for how FuncUI v1 might use adaptive data

@dsyme
Copy link
Contributor Author

dsyme commented Oct 3, 2019

This is not close to complete or even convincing, just putting the basics there to define an adaptivePatch function that, when the return closure is invoked, looks for changes in the adaptive data and applies them as a patch

https://github.com/JaggerJo/Avalonia.FuncUI/pull/21/files#diff-ab3843d5f352bde4083a9cc0f90d3509R565

The diff is not yet computed recursively using other readers, and only deals with property changes. And I haven't actually run the code, just compiled it.

But the idea is there.

@JaggerJo
Copy link
Member

JaggerJo commented Oct 4, 2019

Thanks Don.

Will look into this next week. Would be really cool to make diffing cheaper

@dsyme
Copy link
Contributor Author

dsyme commented Oct 4, 2019

Will look into this next week. Would be really cool to make diffing cheaper

Just to mention that it does come with costs in the programming model for adaptive views. And also there is an underlying issue about whether to use immutable or mutable data for the model. (The Aardvark people often use an immutable model with a reflection-based technique to diff the model to translate into modifications to ChangeableValue etc., which then cause the incremental view diff'ing to kick in.)

@JaggerJo
Copy link
Member

JaggerJo commented Oct 8, 2019

Just had the time to look into this a bit further, and really like the concept. Getting the API that is exposed to the user simple would be the most challenging part IMO, but maybe I'm wrong.

I don't think it's required for most applications, because view diffing with some tricks is fast enough in most cases (as far as my experience goes). If vNext is ready I might try out a hybrid approach, so one could use an adaptive view for that huge chart, but still use the expressive and simple views for the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants