diff --git a/core_backup.c b/core_backup.c index 7c678cee85..10d8628bb6 100644 --- a/core_backup.c +++ b/core_backup.c @@ -269,7 +269,7 @@ bool core_backup_get_backup_crc(char *s, uint32_t *crc) /* Open backup file */ backup_file = intfstream_open_file( s, RETRO_VFS_FILE_ACCESS_READ, - RETRO_VFS_FILE_ACCESS_HINT_NONE); + RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS); if (backup_file) { diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 06d3d96eb1..d87044b315 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -285,8 +285,12 @@ uint32_t netplay_content_crc(void) } else { + /* The whole content file, hashed once at session start: + * FREQUENT_ACCESS so the VFS maps it where it can and the + * CRC is folded from the mapping rather than read out. */ intfstream_t *fd = intfstream_open_file(path, - RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE); + RETRO_VFS_FILE_ACCESS_READ, + RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS); if (fd) { if (!intfstream_get_crc(fd, &crc)) diff --git a/tasks/task_core_backup.c b/tasks/task_core_backup.c index fd708479cc..6e31443ed0 100644 --- a/tasks/task_core_backup.c +++ b/tasks/task_core_backup.c @@ -938,7 +938,7 @@ static void task_core_restore_handler(retro_task_t *task) if (!(backup_handle->backup_file = intfstream_open_file( backup_handle->backup_path, RETRO_VFS_FILE_ACCESS_READ, - RETRO_VFS_FILE_ACCESS_HINT_NONE))) + RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS))) { RARCH_ERR("[Core Restore] Failed to determine CRC of core backup file: \"%s\".\n", backup_handle->backup_path); diff --git a/tasks/task_core_updater.c b/tasks/task_core_updater.c index 5ea67efd72..9576efb5fd 100644 --- a/tasks/task_core_updater.c +++ b/tasks/task_core_updater.c @@ -263,9 +263,11 @@ static bool task_core_updater_crc_step(core_crc_slice_t *slice, if (!slice->active) { slice->accumulator = 0; + /* FREQUENT_ACCESS: mapped where the VFS can, and each + * crc_step() then folds from the mapping without a read. */ if (!(slice->file = intfstream_open_file(core_path, RETRO_VFS_FILE_ACCESS_READ, - RETRO_VFS_FILE_ACCESS_HINT_NONE))) + RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS))) { *crc = 0; return true;