perf: complete performance audit optimizations
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user