From 099c720fc23d0047b400144a6049489cf0b045fc Mon Sep 17 00:00:00 2001 From: "Joseph C. Osborn" Date: Mon, 30 Oct 2023 12:08:37 -0700 Subject: [PATCH] increase chunk size for reads/writes under emscripten --- 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 859f1629c7ff..fd4b19750781 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