-
Notifications
You must be signed in to change notification settings - Fork 87
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
Specific key order appears to cause decrossOpt to hang #107
Comments
This is really interesting, but I think out of scope. It does raise two potential types of solutions:
|
It's beyond my expertise to comment on your suggestions but I have a tangential suggestion: since it's so hard to predict when |
it actually does have a timeout mechanism! Unfortunately I think in the current version the heuristic is off. In an update version it should be better able to predict timeout issues. Sorry that you had to be hit with a case that bypassed the check. I will use this an example to make sure it appropriately errors on this as input. Ideally for graphs like this, an exception will be raised, and if you wanted to backoff, you could catch this exception and switch to a different layout, or even write a custom decross operator that tried opt, and used twolayer if it times out. |
The prerelease version updates this codes to check the actual number of variables, which should be better at catching this inconsistency: d3-dag/src/sugiyama/decross/opt.ts Lines 378 to 384 in f3f0f20
The downside is is creates the program which might be very large. It's possible to compute these sizes in advance, but the code was quite messy, so I opted for this simpler version. Don't hesitate to reopen if it's not addressed. |
Please see this pen: https://codepen.io/g-sam/pen/abqMqbg
There are two json objects,
fast
andslow
, containing the same nodes in a different order. If you construct the layout on line 1871 withfast
, everything renders fine. If you construct it withslow
the browser will freeze. In our app the calculation does actually finish after 5-10 minutes although codepen appears to refresh before this happens.The problem does not occur when using
decrossTwoLayer
.The text was updated successfully, but these errors were encountered: