Hexworks / zircon

Zircon is an extensible and user-friendly, multiplatform tile engine.
https://hexworks.org/projects/zircon/
Apache License 2.0
753 stars 137 forks source link

Use a push model instead of a pull one for rendering #327

Closed adam-arold closed 3 years ago

adam-arold commented 4 years ago

Right now we use a persistent collection to store Zircon's state and we pull from them when rendering. This is not scalable as persistent collections in Kotlin are really slow compared to non-persistent collections.

A solution for this is to reverse rendering strategy: instead of polling the data out of Layers/Components we can write a render function that can take care of this. This will also obviate the need for synchronization and persistent snapshots.