From 82e02ae0b822eb3b072e40fbd0e903e0c0f643a6 Mon Sep 17 00:00:00 2001 From: Graham McInitre Date: Thu, 16 Jul 2026 07:34:15 -0500 Subject: [PATCH] perf: reuse cached hrrr_path in terrain_ready handler instead of re-fetching --- lib/microwaveprop_web/live/contact_live/show.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/microwaveprop_web/live/contact_live/show.ex b/lib/microwaveprop_web/live/contact_live/show.ex index 7ff0627c..45762170 100644 --- a/lib/microwaveprop_web/live/contact_live/show.ex +++ b/lib/microwaveprop_web/live/contact_live/show.ex @@ -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)