dMZX Forums: zread/zwrite need buffering in file mode -> Archived MegaZeux Bugs -> Tracker

Jump to content

Report ID 784 Title zread/zwrite need buffering in file mode
Product Archived MegaZeux Bugs Status Fixed (Severity 1 - Low)
Version 2.92 Fixed in 2.92e
Introduced In Version 2.90Operating System All platforms

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #784: zread/zwrite need buffering in file mode

#1 User is offline  
Lachesis 

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

Posted 02 August 2019 - 07:07 PM

Saving/loading strings and counters uses direct file writing due to how the bounds for these can vary wildly (unlike essentially all other parts of the save file). The lack of buffering in zread/zwrite means this can be very slow on some console ports. These should generate a buffer when the read/write size is below a sufficient threshold so fewer direct file access calls are used. Additionally, the shorthand ZIP file read/write functions should probably use a variant of zread/zwrite with no buffering.

Another improvement that could be made here is keeping the zstream state between zread/zwrite calls so streaming deflate data actually works (at which point the counters and strings files could be deflated, reducing file IO further).
"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
  • Closed Issue This issue is locked

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 07 June 2020 - 10:00 AM

Updating status to: Fixed
Issue fixed in: 2.92e

Fixed in GIT 4ff0f365.
"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  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 16 January 2021 - 07:14 PM

Moving to: Archived MegaZeux Bugs


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

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


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