benank / everyone.dance

A realtime score sharing system for Stepmania. ⚠️ NOTE: This service is deprecated and no longer works, but you can still self host it.
https://everyone.dance
GNU General Public License v3.0
15 stars 1 forks source link

[WIP] Optimize SongData file writes by keeping file handle open #32

Open bkirz opened 3 years ago

bkirz commented 3 years ago

This is a WIP that needs fixing before it can be safely merged.

The goal of this PR is to reduce time spent opening/closing file handles during gameplay by reusing the same open filehandle when updating the song data file. It contains the following changes:

WIP:

Current lua failure on load:

00:17.101: WARNING: Error playing command:/Themes/Simply Love (For E.D Testing)/BGAnimations/everyone.dance.lua:31: File '/Users/bkirz/Library/Prefer
ences/StepMania 5.1/everyone.dance.txt' is not open for reading.          
00:17.101: WARNING: [C]: Seek( = (null))