fix: Preserving tile state on rebuild
Previously each tile widget was discarded and rebuilt on every map gesture. Now it just gets repositioned. I still need to check if this doesn't cause any implications. I think it should improve performance, but "I think" is not a metric, so still want to check on that.
I put the tile into Repaint boundry to check how often it is rebuilt nad was showing on every gesture init was called and dispose.
https://github.com/user-attachments/assets/2579181d-ebec-49b9-b2fe-e74dd3bc5f49
The new approach preservs tiles state.
https://github.com/user-attachments/assets/76e7f91f-c05d-4fcd-9cf0-35ccd8d486ce
What you think of this?
Hey, I'm away right now but this looks pretty good! I'll take a look at it when I'm back. Nice mid-way point (IYSWIM) as we start work on the new tile layer stuff 👍
Thanks for the PR. Unfortunately in my own testing I could not necessarily see a significant performance improvement. I agree that in theory, I would expect this to be better, but it does not seem to necessarily be the case. I think I also saw some white hairline fractures between tiles, especially in debug mode. I will have a look more, but it may just be worth waiting for the new tile layer at this point, not sure.
Yeah. I had the same feeling. And with new TileLayer on horizon, might not be worth it.
Might be better for power consumption if not for performance, but have not tested.
As I couldn't see any significant difference, and I'm a little concerned about messing with the tile logic because it's so delicate, I'm going to close this for now. I'm not sure when the new tile layer will be ready, but it's still slowly in the works. Thanks for the PR though!