- Joined
- Feb 27, 2019
- Messages
- 401
Hello,
I know well that you can write text to a local file with the following primitives:
I'm using it in a logger in my map to debug all bugs, including desyncs. Currently I only do it in replay, but it's laggy. Because I cannot append a line to the file without rewriting the whole buffer to the file...
Is there a way to append 1 line to a file in a performant way ? Without rewriting all the file ?
I know well that you can write text to a local file with the following primitives:
JASS:
call PreloadGenClear() // Optional, clear all previous entries in PreloadGen buffer
call PreloadGenStart() // Clears the buffer and starts a timer until PreloadGenEnd, the time value gets appended to the file
call Preload("<any text to write>") // adds the string to the buffer
call PreloadGenEnd("<file full-name>") // unloads the buffer in a given path.
I'm using it in a logger in my map to debug all bugs, including desyncs. Currently I only do it in replay, but it's laggy. Because I cannot append a line to the file without rewriting the whole buffer to the file...
Is there a way to append 1 line to a file in a performant way ? Without rewriting all the file ?