Skip to content

Possible performance antipattern in formmanipulation #3560

Open
@wence-

Description

@wence-

Describe the current issue

I happened to be looking at this code I wrote years ago and noticed:

return self.expr(o, *map_expr_dags(self.index_inliner, operands))

This is the traversal antipattern discussed in FEniCS/ufl#35

In lieu of a proper fix in UFL to the visitor infrastructure, I think this could be addressed by passing in a cache as the optional argument to map_expr_dags (as seen in FEniCS/ufl#69)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions