TileMapLayer Performance Issue

Godot Version

4.3

Question

I’m using TileMapLayers to create overlays over a grid to show information about stuff like where enemies can move, attack, etc., that has to update as the player and enemies move around. In order to make these overlays visually pleasing, I’m also using terrains to give borders to the highlighted regions along with TileMapLayer.SetCellsTerrainConnect to update the layers in a script. Unfortunately, whenever I update these TileMapLayer overlays, there’s a small but noticeable frame skip. I’ve tried doing the update in a thread and setting process_thread_group in my TileMapLayers to PROCESS_THREAD_GROUP_SUB_THREAD, but neither thing had any effect. Does anyone know how I can fix this performance issue? Is it possible to get the TileMapLayers to update asynchronously somehow?