1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

Bugfix to avoid CPU spike of checking big object length

Don't check the length of the generated indexed database as it's big and causes a lag
This commit is contained in:
Adam Wisher
2025-07-05 17:03:27 +01:00
parent 3cedab5248
commit cd9bbaee87

View File

@@ -244,7 +244,7 @@ async function fetchTx(freq, piCode, rdsPs) {
now - lastFetchTime < fetchInterval ||
Latitude.length < 2 ||
freq < 87 ||
Object.keys(piFreqIndex).length === 0 ||
Object.keys(localDb).length === 0 ||
(currentPiCode === piCode && currentRdsPs === rdsPs)
) return Promise.resolve();