Skip to content

Commit

Permalink
[tools] Module doc generator: Reduce memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium authored and rleh committed Oct 9, 2019
1 parent 4ba344e commit 74b198f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tools/scripts/generate_module_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_modules(builder, limit=None):
num_options = []

print("Querying for {} targets...".format(len(targets)))
mtargets = []
mfinal = None
for target in targets:
option.value = target
target = option.value._identifier
Expand Down Expand Up @@ -107,13 +107,12 @@ def get_modules(builder, limit=None):
qp.setAttribute("type", type(c).__name__)
qp.setAttribute("_description", q._description)

if mfinal is None:
mfinal = modules["modm"]
else:
mfinal.merge(modules["modm"])

mtargets.append(modules["modm"])

print("Merging module tree...")
mfinal = mtargets[0]
for mtarg in mtargets[1:]:
mfinal.merge(mtarg)
print("Sorting module tree...")
mfinal._sortTree()

Expand Down

0 comments on commit 74b198f

Please sign in to comment.