perf: reuse cached hrrr_path in terrain_ready handler instead of re-fetching

This commit is contained in:
Graham McInitre 2026-07-16 07:34:15 -05:00
parent fc51f8afe8
commit 82e02ae0b8

View file

@ -496,7 +496,7 @@ defmodule MicrowavepropWeb.ContactLive.Show do
contact = %{socket.assigns.contact | terrain_status: :complete}
terrain = Terrain.get_terrain_profile(contact.id)
soundings = socket.assigns.soundings
hrrr_path = Weather.hrrr_profiles_for_path(contact)
hrrr_path = socket.assigns[:hrrr_path] || Weather.hrrr_profiles_for_path(contact)
elevation_profile = compute_elevation_profile(contact, hrrr_path, soundings)
propagation_analysis = build_propagation_analysis(contact, hrrr_path, terrain, elevation_profile, soundings)