Keep provider connections alive: TLS handshake costs 4.2s and is paid twice per dictation
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- rust
- Bereich
- networking, performance
Rechercherichtung
No files are named; start by finding where the provider HTTP client is built for each transcription/polishing request and for the LLM channel-health check (likely a client constructed per call). Confirm connections are torn down after each dictation. Done means a pooled client with a multi-minute idle timeout, a warm-up at startup and on provider/model change, and a configurable request timeout — the issue's 4.2s cold vs 0.18s warm timings are the acceptance signal.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
On networks where the TLS handshake to the provider is slow, every dictation pays the handshake
cost twice — once for transcription and once for LLM polishing — because connections are not
kept alive between dictations. On this machine that is the single largest latency term.
Measurements (Windows 11, OpenLess 1.3.18, BYOK OpenAI)
Two requests in a row, the second reusing the connection:
request 1: tcp connect 0.125s | TLS handshake 4.194s | total 4.410s
request 2: tcp connect 0.000s | TLS handshake 0.000s | total 0.183s
The TLS handshake alone costs ~4.2 s; a reused connection answers in 0.18 s, 24x faster.
Supporting numbers:
- DNS resolution is fine: 259-369 ms, same as any other host. Not the bottleneck.
- TCP connect is fine: 0.125 s.
chatgpt.combehaves identically (~4.1 s on first hit). The ChatGPT website feels instant only
because the browser keeps one connection open for the whole session.- Upload is not the bottleneck: 300 KB takes 2.3 s warm vs 5.4 s cold. The delta is the handshake.
This looks like SNI-based traffic inspection on the ISP side. It is outside the control of the app,
but the app decides how often that cost is paid.
What it looks like in the app
Avg per segment on this machine showed 9.5 s; individual dictations 3.1-5.7 s. The channel
health check for the LLM provider reported 5292 ms. Local ASR was tried as well (Foundry Local and
sherpa-onnx, several Whisper sizes), but with a cloud provider the handshake cost is paid on every
dictation and dominates everything else.
Requests
- Keep provider connections alive between dictations — a connection pool with a multi-minute
idle timeout instead of closing after each request. - Warm up the connection when the app starts, and after the provider or model is changed,
so the handshake is paid once per session instead of before each dictation. - If a request timeout exists, make it configurable. With a 4 s handshake plus a long
recording, a fixed short limit produces confusing timeout errors.
Why this is worth doing
For users behind traffic inspection this term is larger than model choice or prompt size.
Two connection settings would cut several seconds off every dictation without changing any
product behaviour.
Related: #994 (plain-text insertion mode).
- Vorherrschende Sprache
- Rust
- Sterne
- 3.7k
- Forks
- 349
- Ø Merge
- 2 T. 14 Std.
- Gemergte PRs (30 T.)
- 97
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Open-Less/openless
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
[windows] 录音快捷键还不支持设置为ScrllLock键Evtl. vergeben @HKLHaoBin hat das vor 9 Tagen übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Open-Less/openless#1241 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 18/100
Maintainer antworten meist innerhalb von 1 Tag
-
[omni] 多模态模式开启翻译后,译文时有时无,或混在 JSON 字段里Evtl. vergeben @Breadswim hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
Maintainer antworten meist innerhalb von 1 Tag
-
[omni] 多模态「验证」对 OpenAI gpt-audio-1.5 必然返回 400Evtl. vergeben @Breadswim hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Open-Less/openless
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
DioxusLabs/blitz#1371 ·
Maintainer antworten meist innerhalb von 1 Tag
-
follow-up
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 62/100
carrick-sh/carrick#1494 ·
Maintainer antworten meist innerhalb von 1 Tag
-
test(hydro_std): track_membership join and leave are untestedEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
hydro-project/hydro#3289 ·
Maintainer antworten meist innerhalb von 1 Tag
-
diagram-bug good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
enhapu-afk/omaspec#4 ·