Skip to content

Commit 8618e07

Browse files
lwaern-intelmandolaerik
authored andcommitted
Add TODO comment re. memoizing merge_method_impl_maps in mkobj2
1 parent 56ffbf7 commit 8618e07

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

py/dml/structure.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,11 @@ def mkobj2(obj, obj_specs, params, each_stmts):
16461646
ancestors.add(implicit_traits[traitset])
16471647
direct_parents = ancestors.difference(*(t.ancestors for t in ancestors))
16481648

1649+
# TODO: this call is not memoized in any way, while it could be per
1650+
# set of highest-rank unrelated traits. We should investigate if the
1651+
# current state presents a bottleneck for devices that feature a large
1652+
# amount of objects that instantiate the same set of templates; if so,
1653+
# memoization should be applied.
16491654
trait_method_impls = traits.merge_method_impl_maps(
16501655
obj.site, explicit_traits)
16511656

0 commit comments

Comments
 (0)