feat: optimización integral y auditoría de rendimiento SIBU 2.0.1

This commit is contained in:
2026-03-01 17:35:13 -05:00
parent 66b76cee61
commit 6ae0e7b0bf
14 changed files with 917 additions and 2170 deletions

View File

@ -15,6 +15,7 @@ export const useBusStopStore = defineStore('busStop', () => {
const CACHE_TIME = 1000 * 60 * 30; // 30 minutos
const now = Date.now();
if (isLoading.value) return;
if (!force && busStops.value.length > 0 && (now - lastFetched.value < CACHE_TIME)) {
return
}
@ -33,6 +34,7 @@ export const useBusStopStore = defineStore('busStop', () => {
}
async function loadBusStopById(id: string, force = false) {
if (isLoading.value) return;
// Buscar en cache primero
if (!force && busStops.value.length > 0) {
const cachedStop = busStops.value.find(s => s.id === id);