From f8d551803cfb6c1db3d24f7ef2731c652b9a5313 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 20 Oct 2019 09:23:51 +0200 Subject: POSIX: Use fstat instead of fseek / ftell to retrieve file stream sizes fstat is generally faster as is does not cause the IO buffer to be invalidated / refilled. Benchmark results for the startup time of the SCI engine with Gabriel Knight 1 CD: - Linux, glibc, spinning HDD, fseek/ftell: 140 ms - Linux, glibc, spinning HDD, fstat: 100 ms - 3DS, newlib, SD card, fseek/ftell: 68 s - 3DS, newlib, SD card, fstat: 11 s --- backends/module.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backends/module.mk') diff --git a/backends/module.mk b/backends/module.mk index 0ed597882b..924164c03f 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -163,6 +163,8 @@ ifdef POSIX MODULE_OBJS += \ fs/posix/posix-fs.o \ fs/posix/posix-fs-factory.o \ + fs/posix/posix-fs-factory.o \ + fs/posix/posix-iostream.o \ fs/posix-drives/posix-drives-fs.o \ fs/posix-drives/posix-drives-fs-factory.o \ fs/chroot/chroot-fs-factory.o \ -- cgit v1.2.3