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

cljol's view doesn't play well with large data structures #2

Open
jumarko opened this issue Jun 27, 2019 · 5 comments
Open

cljol's view doesn't play well with large data structures #2

jumarko opened this issue Jun 27, 2019 · 5 comments

Comments

@jumarko
Copy link

jumarko commented Jun 27, 2019

Trying this on any vector containing more than a few hundreds of elements is painful.
Not only the rendering process takes very long but the resulting picture is unusable.
I tried it with (cljol.dig9/view (vec (range 1000))).

It would be nice if the visualizations were limited to certain "length" / "depth" and parent nodes also contained a "summary" size for all their children together.

@jafingerhut
Copy link
Owner

Agreed that large dumps of data are too much for a person to deal with :)

A summary size for all objects reachable from a given object is a nice addition to what is there now, as long as you realize that those can "overlap", i.e. a common set of objects might be reachable both from objects A and B, although neither A nor B can get to each other by following chains of references.

A depth restriction on what is displayed - yes, also sounds useful.

I am not sure what you mean by a length limit? As in, maximum number of references out of one object that are included? Which subset would you pick if the limit was exceeded?

@jumarko
Copy link
Author

jumarko commented Jun 30, 2019

I don't have a super-clear idea how this should work but I was thinking about something similar to print-length

@jafingerhut
Copy link
Owner

If you try the latest version it uses the ubergraph library to create an intermediate graph before drawing, so all of loom's and ubergraph's algorithms are available for examining it and creating other graphs.

I have implemented the "total size" of all reachable objects, as well as the number of reachable objects, as a label for every object in the graph. Also a function that gives some summary statistics about the graph in text form.

It does not yet implement the depth limit, but that will be a pretty small amount of work from its current state.

@jumarko
Copy link
Author

jumarko commented Jul 2, 2019

That's cool, thanks!

@jafingerhut
Copy link
Owner

OK, code and README on master branch updated a few minutes ago, with examples showing how to create the full graph for one or more objects, then to trim it down in a couple of ways: remove all leaf nodes (which could be repeated), or to limit the node's distance in reference hops away from one of the starting objects.

Oh, and also a function that prints summary statistics about the graph, without showing it, so you can decide whether you want to show it, or first use one of the trimming functions.

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

No branches or pull requests

2 participants