perf(lotw): stop asking for the QSL details by default

A tester compared LogHX's two download options on the same account: two minutes
for the confirmations, twenty for the confirmations with QSO details. OpsLog was
always sending qso_qsldetail=yes — LogHX's slow option — which is the whole of
the wait people were reporting.

Marking a confirmation needs call, date, band and mode; the detail adds the QSL
date and the station's grid, state and county. Now a choice, off by default, and
forced on when the download is also ADDING the QSOs it cannot find — the one
case where those fields have no other source.
This commit is contained in:
2026-08-28 08:54:42 +02:00
parent b24f880d62
commit 65cae0d822
7 changed files with 75 additions and 7 deletions
+19 -1
View File
@@ -402,6 +402,7 @@ const (
keyExtLoTWTQSLPath = "extsvc.lotw.tqsl_path"
keyExtLoTWStationLoc = "extsvc.lotw.station_location"
keyExtLoTWQSLDetail = "extsvc.lotw.qsl_detail" // ask LoTW for the QSL dates and station details (an order of magnitude slower)
keyExtLoTWAllCalls = "extsvc.lotw.download_all_calls" // download confirmations for EVERY call on the account, not just this profile's
keyExtLoTWForceCall = "extsvc.lotw.force_station_callsign" // override STATION_CALLSIGN at sign time (e.g. F4BPO/P on the F4BPO cert)
keyExtLoTWKeyPassword = "extsvc.lotw.key_password"
@@ -12097,6 +12098,16 @@ func manualRefFor(existing, code string) string {
return ""
}
// GetLoTWQSLDetail reports whether the download asks LoTW for the QSL detail.
func (a *App) GetLoTWQSLDetail() bool {
return a.settingOr(keyExtLoTWQSLDetail, "") == "1"
}
// SetLoTWQSLDetail stores that choice.
func (a *App) SetLoTWQSLDetail(on bool) {
a.setSetting(keyExtLoTWQSLDetail, map[bool]string{true: "1", false: "0"}[on])
}
// GetLoTWDownloadAllCalls reports whether the LoTW download ignores the
// profile's own call and pulls every callsign on the account.
func (a *App) GetLoTWDownloadAllCalls() bool {
@@ -12215,7 +12226,14 @@ func (a *App) runDownloadConfirmations(ctx context.Context, svc extsvc.Service,
// The report arrives over minutes, and a window that says nothing while it
// does is indistinguishable from one that has hung — which is what it was
// being reported as. Every half-megabyte, say how much has landed.
adifText, err := extsvc.DownloadLoTWConfirmations(ctx, nil, cfg.LoTW, sinceDate, ownCall, emit)
// Adding the QSOs LoTW knows and we do not is the one job that needs the
// slow report: without the detail those records would come in with no
// grid, state or county, and nothing else would ever fill them.
detail := addNotFound || a.settingOr(keyExtLoTWQSLDetail, "") == "1"
if detail {
emit("Asking for the QSL details too — LoTW takes considerably longer to build that report.")
}
adifText, err := extsvc.DownloadLoTWConfirmations(ctx, nil, cfg.LoTW, sinceDate, ownCall, detail, emit)
if err != nil {
emit("Download failed: " + err.Error())
done(matched, total)