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

Stop the rendered graph from dancing. #379

Merged
merged 2 commits into from
Aug 24, 2015
Merged

Stop the rendered graph from dancing. #379

merged 2 commits into from
Aug 24, 2015

Conversation

tomwilkie
Copy link
Contributor

I'm not sure this actually works, but I wanted to try it out.

The idea is that instead of doing a fresh layout every time we get a graph update, we cache the layout from last time and mutate that.

Some basic testing implies this works, but I'll try harder to break it tomorrow.

Let me know what you think, @davkal!

@davkal
Copy link
Contributor

davkal commented Aug 20, 2015

There was some provision for reusing old locations in the code but that never informed the layout engine. So yeah, looks promising!

@davkal
Copy link
Contributor

davkal commented Aug 21, 2015

Tried it out. Layout is less jumpy with coming/going nodes in the same topology. Switching back and forth between topos still makes different layouts every time.
We can try an approach where we cache all node positions, and then feed those back into the engine.

@tomwilkie
Copy link
Contributor Author

@davkal can you run this with? My JS is not so good.

@davkal
Copy link
Contributor

davkal commented Aug 21, 2015

@tomwilkie sure thing!

@davkal
Copy link
Contributor

davkal commented Aug 22, 2015

Hmm, caching the layout positions was a non-starter, they are not being passed back to the internal node objects that the graph engine uses, they are not on the whitelist, and even if I patch dagre, they dont seem to inform the layout.

I'll try updating to the latest version, and then go for the one-graph-engine-per-topology approach.

@davkal davkal changed the title [WIP] Stop the rendered graph from dancing. Stop the rendered graph from dancing. Aug 22, 2015
@davkal
Copy link
Contributor

davkal commented Aug 22, 2015

Looks better with one engine per topo.

@tomwilkie
Copy link
Contributor Author

LGTM. Will need to regen static.go.

Tom Wilkie and others added 2 commits August 24, 2015 18:19
* one render engine per topology
* improves switching back and forth between topos
* might increase memory use
* roughly fixes #160
davkal added a commit that referenced this pull request Aug 24, 2015
Stop the rendered graph from dancing.
@davkal davkal merged commit a24d798 into master Aug 24, 2015
@davkal davkal deleted the dancing branch August 24, 2015 16:19
@davkal davkal mentioned this pull request Sep 1, 2015
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