App.__read_dep_graph(): Remove redundant loop
__read_dep_graph() iterates over the given sections (flavours), but the loop body does not use the loop variable: it passes the entire sections list to get_project_refs() on every iteration, so the same lookup is repeated for each section, and the recursion into the found dependencies is re-triggered (and skipped) for each of them. Remove the loop and do the lookup once per project. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
bd78657588
commit
c95a3350ba
1 changed files with 11 additions and 12 deletions
|
|
@ -232,18 +232,17 @@ class App(Base):
|
|||
for project in projects:
|
||||
if project in graph:
|
||||
continue
|
||||
for section in sections:
|
||||
deps = self.get_project_refs(
|
||||
[project],
|
||||
['pkg.requires.jw'],
|
||||
sections,
|
||||
scope = Scope.One,
|
||||
add_self = False,
|
||||
names_only = True,
|
||||
)
|
||||
graph[project] = set(deps)
|
||||
for dep in deps:
|
||||
self.__read_dep_graph([dep], sections, graph)
|
||||
deps = self.get_project_refs(
|
||||
[project],
|
||||
['pkg.requires.jw'],
|
||||
sections,
|
||||
scope = Scope.One,
|
||||
add_self = False,
|
||||
names_only = True,
|
||||
)
|
||||
graph[project] = set(deps)
|
||||
for dep in deps:
|
||||
self.__read_dep_graph([dep], sections, graph)
|
||||
|
||||
def __flip_dep_graph(self, graph: Graph) -> Graph:
|
||||
ret: Graph = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue