In 87a9283 removing and updating elements went back to being O(n). What we need is a data structure that gives us efficient lookups and allows us to iterate through all elements in the order they were added. I can't immediately see how this would be done without either O(n) deletions or memory leaks, but apparently Python's default dictionaries manage it. Of course, that data structure needs to be implemented in Haskell and Elm, with working serialisation...
In practice, the layouts might always be small enough that this isn't really an issue.
In 87a9283 removing and updating elements went back to being
O(n)
. What we need is a data structure that gives us efficient lookups and allows us to iterate through all elements in the order they were added. I can't immediately see how this would be done without eitherO(n)
deletions or memory leaks, but apparently Python's default dictionaries manage it. Of course, that data structure needs to be implemented in Haskell and Elm, with working serialisation...In practice, the layouts might always be small enough that this isn't really an issue.