From 76827864115019fd423bf7d79f10df4a74fda771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Sun, 1 Dec 2024 11:15:47 +0100 Subject: [PATCH] Add remark about decoding performances --- lib/data_source/jellyfin_api.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/data_source/jellyfin_api.ml b/lib/data_source/jellyfin_api.ml index d17fca2..42271ec 100644 --- a/lib/data_source/jellyfin_api.ml +++ b/lib/data_source/jellyfin_api.ml @@ -400,6 +400,9 @@ let request (type pp p r) ~base_url ?token ?headers } else return !/[^\x00-\x7f]/.test(s); } *) + (* TODO: one way to improve performance might be to use a direct Jstr.t -> + Jv.t -> Yojson.Safe.t flow so that only strings in field would be converted + to caml strings, not the whole request. *) let cuts = Jstr.cuts ~sep:(Jstr.v "{") json in let json = List.map cuts ~f:Jstr.to_string |> String.concat ~sep:"{" in let yojson = J.from_string json in