From 257f9a079e5392e9bf67ab228de11ea63014cfab Mon Sep 17 00:00:00 2001 From: Carlo Baratto Date: Sun, 13 Sep 2026 07:37:40 +0200 Subject: [PATCH] =?UTF-8?q?docs(protocol):=20nota=20prestazioni=20?= =?UTF-8?q?=E2=80=94=20primo=20fetch=20sessioni=20dopo=20switch=20profilo?= =?UTF-8?q?=20(10-16=20s,=20cache=20fredde)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/PROTOCOL.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index dd77abc..37ab80f 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -194,6 +194,12 @@ sua). Per tornare al profilo attivo del server basta rimuovere il cookie. Validato contro il server reale (2026-09: switch → 200 + Set-Cookie firmato; profilo inesistente → 404 `Profile 'x' does not exist`). +Nota prestazioni: dopo uno switch la **prima** `GET /api/sessions` per quel +profilo puo' richiedere 10-16 s anche su uno state DB minuscolo (cache fredde +lato server); le chiamate successive tornano a pochi ms. Il client usa quindi +un timeout generoso (60 s) e mostra lo stato di caricamento, mai un'attesa +infinita. + ## 6. Note operative - Tutti gli errori API sono JSON `{"error": "..."}`.