dMZX Forums: 3DS file IO is slow, causes lag with sound effects and slow load menu -> MegaZeux Bugs -> Tracker

Jump to content

Report ID 778 Title 3DS file IO is slow, causes lag with sound effects and slow load menu
Product MegaZeux Bugs Status Confirmed (Severity 3 - Medium)
Version - Fixed in -
Introduced In Version 2.91Operating System Nintendo 3DS

Page 1 of 1
  • Cannot start a new Issue
  • You cannot reply to this issue

Report ID #778: 3DS file IO is slow, causes lag with sound effects and slow load menu

#1 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 17 July 2019 - 07:37 AM

This has been a known issue since the 3DS port was merged but no bug report has been filed for it yet. The 3DS port has uniquely slow filesystem IO that affects the performance of games using sound effects, partial charsets, MZMs, and probably pretty much anything else. It also makes the Load World menu slow to open if any more than a small number of worlds are present in the current path. This probably needs to be fixed at some point in the near future.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository


Page 1 of 1  
  • Cannot start a new Issue
  • You cannot reply to this issue

Replies (1 - 2)

#2 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 21 September 2019 - 11:48 PM

Some parts of this have been separately implemented:

  • MZX now uses setvbuf with world save/load operations, which appears to be improving their performance on the 3DS (GIT 3b243e50). This was further improved by greatly reducing fseek usage in the legacy world loader (GIT 022811c2) and ZIP world loader (GIT 79dab6b8).
  • MZX now supports dirent's d_type field for platforms that support it (including the 3DS and several other embedded platforms) (GIT ce7427cf). This is used in the file manager to avoid stat calls while reading the directory, eliminating most of the delay on the 3DS. This could be used elsewhere, too. There's still a (much smaller) delay caused by the portion of the file manager that loads world names to display.
  • Skeleton code now exists for file caching (lol zip vfs) that should improve repeat file access times for the 3DS (and for OGG files for all platforms) (GIT e239ca7b).


TODO:
  • Actually implement file caching.
  • Actually use the vfs.c functions everywhere in MZX where it might matter instead of stdio.

"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#3 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 21 September 2023 - 07:35 PM

This was mostly fixed by implementing feature request 799.

There is one remaining issue here, which is that fsafetranslate misses are still incredibly slow. I reduced most of the lag here by having the 3DS skip cases 1-4 of fsafetranslate, but the dirent scan is still noticeably slow.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository


Page 1 of 1
  • Cannot start a new Issue
  • You cannot reply to this issue

1 User(s) are reading this issue
1 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2024  IPS, Inc.