perf: complete performance audit optimizations

This commit is contained in:
2026-02-26 22:17:56 -05:00
parent c9a260ab23
commit a8eaad7f35
14 changed files with 439 additions and 33 deletions

View File

@ -32,7 +32,16 @@ export const useBusStopStore = defineStore('busStop', () => {
}
}
async function loadBusStopById(id: string) {
async function loadBusStopById(id: string, force = false) {
// Buscar en cache primero
if (!force && busStops.value.length > 0) {
const cachedStop = busStops.value.find(s => s.id === id);
if (cachedStop) {
selectedStop.value = cachedStop;
return;
}
}
isLoading.value = true
error.value = null
try {