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

Update signal graph nodes in topological order. #658

Closed
wants to merge 1 commit into from

Conversation

shashi
Copy link
Contributor

@shashi shashi commented Jun 12, 2014

Currently every event requires visiting every node in the signal graph. This is an experiment to use topological order in the signal graph to only visit the nodes that need to update in the right order. This approach also makes for clearer signal propagation code (without count++ in recv etc.). This is O(n*log(n)) in the worst case, compared to O(n) but I expect this will be faster in most cases with multiple Input nodes. I tried it out on most examples in on elm-lang.org, it works. I couldn't think of a reason why this would behave any differently.

This was suggested by @stevengj on JuliaGizmos/Reactive.jl#4

@johnpmayer
Copy link
Contributor

This looks pretty intrusive. Would you mind introducing the idea on the
mailing list?
On Jun 12, 2014 12:50 PM, "Shashi Gowda" [email protected] wrote:

Currently every event requires visiting every node in the signal graph.
This is an experiment to use topological order in the signal graph to only
visit the nodes that need to update in the right order. This approach also
makes for clearer signal propagation code (without count++ in recv etc.).

This was suggested by @stevengj https://github.com/stevengj on

JuliaGizmos/Reactive.jl#4 JuliaGizmos/Reactive.jl#4

You can merge this Pull Request by running

git pull https://github.com/shashi/Elm topo_sort

Or view, comment on, or merge it at:

#658
Commit Summary

  • Update signal graph nodes in topological order.

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#658.

@shashi
Copy link
Contributor Author

shashi commented Jun 12, 2014

@evancz
Copy link
Member

evancz commented Jul 25, 2014

This is a cool idea, but I am going to close for now. I think we need to show benchmarks for changes that are for signal performance and I want to keep an architecture that is without glitches.

@evancz evancz closed this Jul 25, 2014
@shashi
Copy link
Contributor Author

shashi commented Jul 25, 2014

👍 I will get around to doing the benchmarks soon.

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.

3 participants