mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Remove the path_is_valid() call when loading textures
== DETAILS The `path_is_valid()` call ends up invoking `stat()`, which is unpredictable. It's practically free when implemented by an operating system (Linux, Windows), but on embedded systems it can be problematic. In the case of the Wii U, the stat() call actually ends up taking longer than the file I/O. And the texture loading code already handles a "file not found" case, so the stat() call ends up just being a waste of time. Removing this reduces the texture load time from ~210-250ms down to 60-65ms on average.
This commit is contained in:
parent
43b1bbed46
commit
0e0fbb53f9
@ -1489,9 +1489,6 @@ bool gfx_display_reset_textures_list(
|
||||
|
||||
fill_pathname_join(texpath, iconpath, texture_path, sizeof(texpath));
|
||||
|
||||
if (!path_is_valid(texpath))
|
||||
return false;
|
||||
|
||||
if (!image_texture_load(&ti, texpath))
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user