ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

[Improvement]: Add a method to return the dependency levels to DepenendencyGraph.java class

Open sameerajayasoma opened this issue 1 year ago • 2 comments

Description

Ballerina compiler driver uses the DependencyGraph.java class to represent the dependency graph of a given Ballerina package.

At the moment, the compiler driver uses the public List<T> toTopologicallySortedList() method to get the topologically sorted list of dependencies. Then, the driver sequentially compiles each dependency in this list.

Eventually, we want to compile dependencies in parallel as much as possible. If we can get the levels of the dependencies tree, then we could compile each node in a given level in parallel. To do that, we need a method in this class that returns the levels.

Describe your problem(s)

No response

Describe your solution(s)

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

sameerajayasoma avatar Jul 02 '24 19:07 sameerajayasoma