enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.33k stars 320 forks source link

Improve the speed of preorder operation on IR #10537

Open hubertp opened 1 month ago

hubertp commented 1 month ago

The initial build of UUID map is a major bottleneck during an update to visualizations.

Initial experiments in optimizing preorder and children operations on IR failed after experiment on projects with a large number of nodes. Using mutable collections, instead of constructing plain list during IR travels also failed to confirm significant gains in performance.

JaroslavTulach commented 1 month ago

I would change the preorder method signature to default java.util.Iterable<IR> preorder() { and had a lazily build iterator that never materializes more than one level of children().