josephwegner / makehex

GNU General Public License v3.0
3 stars 0 forks source link

UI locks up after large changes #19

Open josephwegner opened 5 years ago

josephwegner commented 5 years ago

About 5 seconds after a large set of changes, the editor UI will lock up and not allow any changes. After ~1s the UI will unlock and any clicks sent during the lock will register.

This is caused by the bulk map sync sent from the server after TileUpdateWorker finishes persisting changes in the DB. It resends the entire map, and then the client parses out what needs to be redrawn and does so. For large maps, that's a lot of processing, and consumes the JS process. We may want to break up the processing bit on the client to be async, or otherwise find ways to optimize it.