From 3167529fbf49437fcbe2c2117ef6a52a0a435966 Mon Sep 17 00:00:00 2001 From: Joe Osborn Date: Tue, 31 Oct 2023 07:18:45 -0700 Subject: [PATCH] increase chunk size for reads/writes under emscripten (#15845) --- tasks/task_save.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/task_save.c b/tasks/task_save.c index 859f1629c7f..fd4b1975078 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -62,7 +62,11 @@ #include "../cheat_manager.h" #endif -#if defined(HAVE_LIBNX) || defined(_3DS) +#ifdef EMSCRIPTEN +/* Filesystem is in-memory anyway, use huge chunks since each + read/write is a possible suspend to JS code */ +#define SAVE_STATE_CHUNK 4096 * 4096 +#elif defined(HAVE_LIBNX) || defined(_3DS) #define SAVE_STATE_CHUNK 4096 * 10 #else #define SAVE_STATE_CHUNK 4096