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

a little performance improve on k-shortest #4357

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BlankRain
Copy link

@BlankRain BlankRain commented Dec 5, 2019

https://discuss.dgraph.io/t/performance-is-not-good-when-finding-the-paths-between-2-nodes-with-k-shortest/3533/2
https://discuss.dgraph.io/t/shortest-query-runs-out-memory/3695

If the data has cycle , for example
A to B , to is a reversed edge. so B ~to A.
if there is a path A to B to C to D .
it may add some route like A to B ~to A to B to C to D.
the cycling in A to B ~to A wastes memory.
and make the priorityQueue growing without stop.
that's one of the reasons for run out of memory.
In Djikstras algorithm , a DAG is better.
so if we break some cycles in adjacencyMap, we can make our path-finder go forward.
and save half of memory if A B both connected as A to B, B ~to A


This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Apr 29, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ harshil-goel
❌ BlankRain
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

github-actions bot commented Aug 7, 2024

This PR has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.

@github-actions github-actions bot added the Stale label Aug 7, 2024
@harshil-goel harshil-goel changed the base branch from master to main August 13, 2024 22:48
@harshil-goel harshil-goel requested a review from a team as a code owner August 13, 2024 22:48
@github-actions github-actions bot removed the Stale label Aug 14, 2024
Copy link

This PR has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants