med-material / LoggingManager

LoggingManager Package for Unity. Saves to CSV and to MySQL Databases.
MIT License
3 stars 3 forks source link

LoggingManager: Don't use File.AppendAllText #8

Closed bastianilso closed 4 years ago

bastianilso commented 4 years ago

File.AppendAllText opens the file then writes a line then closes a file. This causes a bad performance impact and is probably the reason for the large delay when we save data. Instead we should open a filestream and write, then close the file stream.

See: https://stackoverflow.com/questions/5074661/c-sharp-speed-of-file-appendalltext

bastianilso commented 4 years ago

fixed with 7ae5dd3f0341200ac346646f3bf60db7bb7ff417