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
pkg:observe -- implement dirty-checking fallback for non-observable objects #16342
Comments
Removed Library-Observe label. |
if we don't do this, we'll need to fix computed properties. |
s/fix/make easier ... |
Issue #13458 has been merged into this issue. |
This comment was originally written by joo....@gmail.com yes, list and map work in web_ui fine, but on polymer has not reached the expected results, never. |
Removed Area-Polymer label. |
Added this to the Later milestone. |
Added Polymer-P-2 label. |
Removed this from the Later milestone. |
IMO, should be higher priority... it's a big usability disadvantage compared with other systems. Removed Priority-Medium, Polymer-P-2 labels. |
High Pri means we have a milestone assigned. Does this mean you're signing up to make it happen in 1.6? :) |
@seth -- Sadly no, am not working on this feature area anymore. |
Since packages have an independent release cycle than the SDK, I don't want to assign any Milestone (it just confuses everyone). This is important, there are many other things with higher priority for now, so I doubt we'll get to this that soon. Added Polymer-P-2 label. |
Removed Polymer-P-2 label. |
Removed Polymer-Milestone-Later label. |
Bumping Priority. Removed Priority-High label. |
It would be great if there were some way to ensure that dirty-checking does not creep into a codebase unexpectedly. From experience in large XAML apps which had a similar slow-path for non-observables we had to have a strict 'must never use the slowpath' rule, but did not have a decent way of enforcing it. It's a bit tricky because the final component of a binding path may support observing while intermediate steps do not (or the reverse). This could potentially be mitigated by tools for inspecting binding state of a DOM tree, but as a dev I'd prefer to be able to prevent this entirely. |
Jake/Siggi, does this seem worth it? cc @jakemac53. |
lets close imo |
This issue has been moved to dart-archive/observe#58. |
After landing https://codereview.chromium.org/132403010/ we'll have most of the infrastructure to do this.
Ideal:
* Ideal: @observable transform does not require ChangeNotifier base class.
* Need a way of marking an object @observable in another library.
* Do we need an object to be a ChangeNotifier and have some properties dirty-checked? If so, we need a way of attempting to subscribe, and determining if such a property is not available for subscription. I think we need this to make computed properties really easy to use. Alternatively we can throw an error in this case so user at least knows that they forgot to make a property @observable.
* remove Observable base class -- objects can be observed via PathObserver/CompoundObserver. Add ObjectObserver from observe-js
* ObservableList still provided as the "fast version"
* Add logging/tracing diagnostics about dirty checking to provide developers a way to assess performance impact of dirty checking -- how many objects, which objects, how often was dirty checking run and how long did it take?
* For best performance, this should be combined with an approach that generates fast-paths for expressions found in HTML
* For now, the @observable transform will not be run in dev mode, meaning those objects will be treated as dirty-checked. If using "pub serve" the transform will happen automatically.
Any flaws in this plan? We've tried this before and not succeeded. I think the big changes since we last looked at this:
pub build
is here andpub serve
is comingThe text was updated successfully, but these errors were encountered: