Giter Club home page Giter Club logo

domic's People

Contributors

6hundreds avatar artem-zinnatullin avatar dhartwich1991 avatar dschaller avatar mikecutalo avatar satoshun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

domic's Issues

Add benchmark app.

It should do same stuff differently so we could profile it (systrace, etc) and compare implementations, right now I just modify sample app and profile that.

Right now I'm thinking about at least 4 options:

  • Render changes directly on main thread
  • Render changes that were computed off main thread and then posted to main thread
  • Render changes that were computed on main thread with Domic
  • Render changes that were computed off main thread with Domic

State sync between Domic and Android Framework.

This is a tracking issue for discussions of the problem.

Problem

Android Framework is mutable (duh). Mostly it's fine, however some View/Widget properties can be updated by Framework/user, for example TextView/EditText.text or CompoundButton.checked.

Problem Example with CheckBox:

  1. Developer sets checked to false via Domic
  2. User of device clicks on it and effectively sets checked to true
  3. Developer sets checked to false via Domic again

If Domic doesn't track state changed by user of the device (read as Android Framework), it will just dismiss the update because it compares it with internal in-memory state.

Solution

Current solution is to observe state of such properties and update internal in-memory state thus keeping Domic in sync with Android Framework.

Was discussed with lead of Android UI Framework Adam Powell

API to capture and apply captured state.

Since we pipe all changes through our model, we can expose API that can let user capture and apply captured state.

That can be helpful for state save/restore, reproducing UI from bug reports, etc.

Unnecessary inline function AndroidChange.mapToChange

Pointed out by @Tagakov

internal inline fun <T> Observable<T>.mapToChange(obj: Any, propertyId: Int, crossinline func: (T) -> Unit): Observable<out Change> = map { value ->

I wanted to avoid allocation of a func: (T) -> Unit, but failed to notice that I trade it off with inlining anonymous class instantiation to each call site which is not great

Function should not be inlined.

"First frame problem".

There is a common problem with async rendering: due to async data arrival and async switching to ui thread you're effectively skipping first frame.

In many cases it's not really a problem because it's very hard to notice one frame without data, especially if default layout state already displays something.

However in some cases like very different default state of the layout compared to the state with data (ie whole content is invisible by default, etc) it can be noticeable.

This GitHub issue tracks possible solutions and general discussion of this problem.

cc @alexjlockwood @kxfang

Also related to RxAndroid ReactiveX/RxAndroid#228

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.